renderGaugeChart method

  1. @override
RenderedChartJS renderGaugeChart(
  1. Element output,
  2. ChartSet chartData
)
override

Renders a Horizontal Bar Chart:

Implementation

@override
RenderedChartJS renderGaugeChart(Element output, ChartSet chartData) {
  checkRenderParameters(output, chartData);
  checkLoaded();

  var canvas = asCanvasElement(output);

  var set =
      chartData.options.sortCategories ? chartData.setSorted : chartData.set;

  chartData.ensureColors(colorGenerator);

  var colors = chartData.colors!;
  var disabledColors = chartData.disabledColors!;

  var renderArgs = [
    canvas,
    chartData.title,
    chartData.xTitle,
    chartData.yTitle,
    JsObject.jsify(chartData.xLabels),
    JsObject.jsify(set),
    JsObject.jsify(colors),
    JsObject.jsify(disabledColors),
    _onClick(chartData)
  ];

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

  return RenderedChartJS(this, 'gauge', chartObject, chartData);
}