renderLineChart method

  1. @override
RenderedApexCharts renderLineChart(
  1. Element output,
  2. ChartSeries chartData
)
override

Renders a Line Chart:

Implementation

@override
RenderedApexCharts renderLineChart(Element output, ChartSeries chartData) {
  checkRenderParameters(output, chartData);
  checkLoaded();

  var div = asDivElement(output);

  var series = chartData.options.sortCategories
      ? chartData.seriesSortedByCategory
      : chartData.series;

  series = _reverseSeries(series);

  chartData.ensureColors(colorGenerator);

  var colors = chartData.colors!;

  var renderArgs = [
    div,
    chartData.title,
    chartData.xTitle,
    chartData.yTitle,
    JsObject.jsify(chartData.xLabels),
    _xAxisMinMax(chartData),
    _yAxisMinMax(chartData),
    JsObject.jsify(series),
    _verticalLines(chartData),
    JsObject.jsify(colors),
    chartData.options.fillLines,
    chartData.options.straightLines
  ];

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

  return RenderedApexCharts(this, 'line', chartObject, chartData);
}