Stacked Chart + Target line


#1

Hi Guys,
How can i add simple target line to the “column type” stacked chart using code?

image


#2

Dear @TKey,
Sorry for the delay. PlotBands are available, that have a similar effect. For example:

You can add these with JavaScript. Go to Dashboard -> Advanced, and use the following code:

var handlers = {};
handlers.preRender = function(config, logger) {
  var plotbands = [
      { from: 100, to: 105, color: "red" }
  ];
  config.valueAxis.plotBands = plotbands;
  logger.debug('Configuration: ', config);
  return true;
}

You can actually have more than one of these. More info in Kendo documentation - https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart/configuration/valueaxis.plotbands