如何在图表JS中堆叠的条形图中添加起点和终点?

发布于 2025-02-01 11:17:49 字数 234 浏览 2 评论 0原文

我需要在堆叠图表上添加起点和结尾点,有什么方法可以添加。

在给定的图片中,我需要从4而不是0启动SaaS快速比率。

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

Click Here to view the image

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

家住魔仙堡 2025-02-08 11:17:49

设置为 series.threshold.threshold.threshold 您的案例您可以在Yaxis的4中启动列。

 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]
  }]
});

演示: https://jsfiddle.net.net/blacklabel/blacklabel/f73zcu4t/f73zcu4t/

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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文