HTML Charts
HTML Charts / Setup guide

Set up a chart on your dashboard

Every chart works the same way: it finds a grid on the same page by its column headers, reads the rows and draws itself. Getting one working is mostly about the grid – the right columns, the right names, on the right page.

1

Build the grid

Add a grid with the chart's columns to the same page as the chart, behind it and tall.

2

Map your names

Tell the chart what your columns are called – the builder below writes this for you.

3

Paste and check

Paste the snippet into an HTML container and compare the row count under the chart with the grid.

Snippet builder

Pick a chart, type your grid's header names next to the ones it expects, and copy the snippet. Anything you leave blank uses the default name.

Chart expectsYour headerShow as (optional)

Copy header text from the grid itself. Spaces and capital letters don't matter.

Lower is better

Tick metrics where a fall is good news, like costs.

Your snippet
    Open this chart's demo

    Platforms

    The charts are tested on MicroStrategy and plain web pages. Tableau, Looker, Power BI and Qlik follow each platform's own extension route; that code is a starting point and hasn't been tested here.

    Works as-is · tested

    The charts were built here first. They read a grid on the same dossier or document page.

    1. Add a grid with the chart's columns to the same page. Keep only the columns the chart needs, make it wide enough that there's no sideways scrollbar, and make it as tall as you can – the taller it is, the faster every row is read.
    2. Put the grid behind the chart rather than hiding it – MicroStrategy doesn't draw hidden grids, so there'd be nothing to read.
    3. Add an HTML container, choose HTML Text, and paste the snippet from the builder below.
    4. Copy header names from the grid itself, not the dataset panel – derived metrics often show a different name in the grid.
    5. Keep data-grid-class and data-scroll-class in the snippet. MicroStrategy only draws the rows on screen; these tell the chart which box to scroll so it reads them all.
    6. Point filters and selectors at the grid – the HTML container can't be targeted, but the chart redraws whenever the grid changes.
    7. Check it in presentation mode. Editor mode adds panels that can get in the way.
    MicroStrategy HTML container – Time Series Trio with your own names
    <div data-chart-embed="time-series-trio"
         data-columns='{"date":"Day","v1":"Revenue","v2":"Orders","v3":"Conversion Rate"}'
         data-labels='{"v3":"Conversion"}'
         data-grid-class="mstrmojo-Xtab" data-scroll-class="mstrmojo-scrollNode"
         style="height:100%"></div>
    <script>
    (function () {
      var s = document.createElement("script");
      s.src = "https://viz.kaijxnes.com/charts/time-series-trio-1.1.0.js";
      s.integrity = "sha384-F2pDVH7opAMJfPa3jfIzMuP8jLXHCiAQONDIo4mvAXK6GnmXvJypmeGdOX0Hhofb";
      s.crossOrigin = "anonymous";
      document.head.appendChild(s);
    })();
    </script>
    Copying a page or dossier is fine: each copy of the chart finds its own grid on its own page.

    Everything you can set on the placeholder

    AttributeWhat it doesExample
    data-chart-embedWhich chart to draw – the chart's id.data-chart-embed="funnel"
    data-columnsYour grid's header names, by the chart's column keys. Only list the ones that differ from the defaults. Matching ignores spaces and capitals.data-columns='{"v1":"Revenue","units":"Customers"}'
    data-labelsShorter names to show on the chart. Without it the chart shows your header names.data-labels='{"v1":"Revenue (£)"}'
    data-titleReplaces the chart's heading.data-title="Weekly trading"
    data-lower-betterMetrics where a fall is good news, such as costs – their changes show green when they go down. Gauges also accept KPI names.data-lower-better='["v2"]'
    data-min-volumeMonthly Bars only: flags months with fewer Units than this as a less reliable reading.data-min-volume="600"
    data-grid-class / data-scroll-classFor grids that only draw the rows on screen: the class names of the grid's container and its scroll box. On MicroStrategy use mstrmojo-Xtab and mstrmojo-scrollNode.data-grid-class="mstrmojo-Xtab"
    style="height: …"The chart fills its placeholder. 100% fills an HTML container; on a web page give it a height.style="height:600px"

    Getting the grid right

    If it doesn't work

    For your admin

    Made by – data analyst building custom visuals for reporting. See my CV