简体   繁体   中英

How I can Add Start and end point in stacked bar chart in chart js?

I need to add starting and ending points on stacked charts , is there any way we can add it.

点击这里查看图片

In The Given picture I need to start SaaS Quick Ratio from the 4 rather than 0 .

Setting to series.threshold give you possibility to serve base to the column, in your case you can start column from 4 at yaxis.

 Highcharts.chart('container', {
  chart: {
    type: 'column'
  },
  title: {
    text: 'Stacked column chart'
  },
  xAxis: {
    categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
  },
  series: [{
    name: 'John',
    threshold: 4,
    data: [5, 3, 4, 7, 2]
  }, {
    name: 'Jane',
    data: [2, 2, 3, 2, 1]
  }, {
    name: 'Joe',
    data: [3, 4, 4, 2, 5]
  }]
});

Demo: https://jsfiddle.net/BlackLabel/f73zcu4t/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM