MAIDR JavaScript API
    Preparing search index...
    • Reads a themeRiver as the stacked area it draws.

      Measured, the series carries ['time', 'value', 'name'] with one row per band per instant -- a flat list, not a row per band:

      count=6  A@2020-01-01=10  A@2020-01-02=15  A@2020-01-03=12
               B@2020-01-01=5   B@2020-01-02=8   B@2020-01-03=20
      

      getName(i) answers the band's name rather than a category label, so the grouping this reading does is the only way the bands come apart. They are emitted in first-appearance order, which is the order the chart stacks them in.

      time is epoch milliseconds. Announced raw it would read as "1577836800000", so it is turned back into the date it is -- see instant.

      One selector per band, which took a correction to get right. This was first shipped without an outline, on the reasoning that TraceType.STACKED_AREA is a segmented trace whose selectors are a row per series aligned to that series' points -- a pairing the drawing does not offer, since it paints one filled path per band rather than one per datum. The premise was wrong: factory.ts routes STACKED_AREA to AreaTrace, which extends LineTrace, and a line takes one selector per series. One filled path per band is exactly that shape.

      The marks are filled rather than stroked, so they are found with markPerDatum over a count of bands rather than with markPerSeries. Withheld unless there is one per band that was read: a list that does not line up pairs every band with the wrong path.

      Parameters

      • seriesModel: EChartsSeriesModel

        The series to read

      • model: EChartsModel

        The chart's model, for the axis name

      • selectors: string[] | undefined

        One selector per band, when they were found

      Returns MaidrLayer | undefined

      The layer, or undefined when nothing measurable was drawn