1
votes

image

I am trying to set fixed width for bars in the waterfall chart using pointWidth but using that I am unable to increase width of entire group of bars.

I tried it using groupPadding and pointPadding. It didnt help much.

Below is the chartoptions I have used to set in highcharts.

{
    chart: {
      type: "waterfall"
    },
    title: {
      text: "Grouped Waterfall"
    },
    xAxis: {
      categories:['Commission', 'Client Fee', 'Fee', 'Discount', 'Payaway', 'Revenue'],
      crosshair: true
    },

    yAxis: {
      min: 0,
      title: {
        text: 'GWP'
      }
    },
    plotOptions: {
      waterfall: {
        pointWidth: 20,
      }
    },
    series: [
      {
        name: "Tokyo",
        data: [
          { y: 116440000, w: 20 }, 
          { y: 9390000, w: 20 }, 
          { y: 5410000, w: 20 }, 
          { y: -66880000, w: 20 }, 
          { y: -2270000, w: 20 }, 
          { y: 62090000, isSum: true }
        ]
      },
      {
        name: "New York",
        data: [
          { y: 9390000 }, 
          { y: 116440000 }, 
          {  y: -66880000 }, 
          { y: 5410000 }, 
          { y: -2270000 }, 
          { isSum: true, y: 62090000 }
        ]
      },
      {
        name: "London",
        data: [
          { y: 116440000 }, 
          { y: 9390000 }, 
          { y: 5410000 }, 
          { y: -66880000 }, 
          { y: -2270000 }, 
          { isSum: true, y: 62090000 }
        ]
      },
    ]
  }
1
Hi @Mayuri Rathod, Could you describe more precisely what you want to achieve? The pointWidth option seems to work correctly: jsfiddle.net/BlackLabel/L4oq5gzfppotaczek
@ppotaczek Hi, I want to increase the width of 3 columns together that is width of commission or Client FeeMayuri Rathod

1 Answers

0
votes

You can use the pointWidth option for a individual data point:

series: [{
    ...,
    data: [{
        y: 116440000,
        pointWidth: 20
    }, ... ]
}]

Live demo: http://jsfiddle.net/BlackLabel/c0yxh432/

API Reference: https://api.highcharts.com/highcharts/series.column.data.pointWidth