renderScatterTimedChart method

  1. @override
RenderedApexCharts renderScatterTimedChart(
  1. Element output,
  2. ChartTimeSeries chartSeries
)
override

Renders a Scatter Chart Timed with DateTime values in X axis:

Implementation

@override
RenderedApexCharts renderScatterTimedChart(
    Element output, ChartTimeSeries chartSeries) {
  checkRenderParameters(output, chartSeries);
  checkLoaded();

  var div = asDivElement(output);

  var timeSeries = chartSeries.seriesAsPairsOfList(
      sortSeriesByCategory: chartSeries.options.sortCategories,
      mapDateTimeToMillis: true);

  chartSeries.ensureColors(colorGenerator);

  var colors = chartSeries.colors!;

  var yAxisScale = chartSeries.yAxisScale!;

  var yMin = yAxisScale.minimumNice;
  var yMax = yAxisScale.maximumNice;

  var renderArgs = [
    div,
    chartSeries.title,
    chartSeries.xTitle,
    chartSeries.yTitle,
    _xAxisMinMax(chartSeries),
    _yAxisMinMax(chartSeries),
    JsObject.jsify(timeSeries),
    _verticalLines(chartSeries),
    JsObject.jsify(colors),
    yMin,
    yMax,
    true
  ];

  var chartObject = _jsWrapper!.callMethod('renderScatter', renderArgs);

  return RenderedApexCharts(
      this, 'scatter-time-series', chartObject, chartSeries);
}