最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - stacked waterfall charts in highcharts - Stack Overflow

programmeradmin0浏览0评论

We have a requirement for stacked waterfall charts (we are using highcharts). / gives an option for creating waterfall charts but we need to create stacks. Anyone has done this before? Thanks !!

We have a requirement for stacked waterfall charts (we are using highcharts.). http://fiddle.jshell/8JP8T/ gives an option for creating waterfall charts but we need to create stacks. Anyone has done this before? Thanks !!

Share Improve this question edited May 7, 2011 at 17:45 skaffman 404k96 gold badges824 silver badges775 bronze badges asked May 7, 2011 at 17:41 toamitkumartoamitkumar 391 silver badge5 bronze badges 1
  • Could you provide an example image for what you want? – NT3RP Commented May 9, 2011 at 16:33
Add a ment  | 

3 Answers 3

Reset to default 3

You can make stacked bars "levitate" by making an ghost series, then setting the ghost series to have an opacity of 0.

$.each(chart.series[2].data, function(i, point) {
  if (i==2) {
    point.graphic.attr({opacity: 0, 'stroke-width': 0});
  }
}

This fiddle illustrates the basic idea. Note that you need to turn shadows off and set showInLegend to false too to get the full ghostly effect.

http://jsfiddle/6UPrg/13/

Based in your example, you may be interested in the stacking property found within highcharts.

var chart = new Highcharts.Chart({
    //other properties...
    plotOptions: {
        series: {
            stacking: 'normal'
        }
    }
});

http://highcharts./demo/column-stacked

发布评论

评论列表(0)

  1. 暂无评论