MAIDR Documentation - v4.4.0
    Preparing search index...
    • The positions in a chart's data, in the order its categories are drawn.

      A category axis with reverse: true is drawn from the far end -- the last-listed category leftmost on a vertical chart, topmost on a horizontal one -- while chart.data.labels and every dataset stay in the order they were written. Nothing in the bar family re-sorts what it is handed: BarTrace and SegmentedTrace announce layer.data as it arrives, unlike ScatterTrace, which sorts by ascending x and so cannot be steered from an adapter at all (#1007). Emitting the written order therefore reads a reversed chart backwards (#1015).

      Exported because the highlight half has to walk the categories the same way. Chart.js paints to canvas and none of these layers carry selectors, which looked at first like an absence of the both-halves-must-move hazard of #988 or #1000 -- but the plugin outlines by index, through the table computeTargetMaps builds, and a table built in the written order names a different bar from the one a reversed payload announces (#1024). Sharing this walk is what keeps the two from drifting apart again.

      Parameters

      • chart: ChartJsChart

        The chart being read

      • count: number

        How many category positions it has

      Returns number[]

      0..count-1, turned round when the category axis is reversed