change width of bars in chart

Options
Ele
Ele
edited February 11, 2022 in Analytics #1
Hi all¡¡

Is it possible to change the width of the bars in a chart???

Thank you all¡

Comments

  • JasonW
    edited December 31, 1969 #2
    Options
    You can change the bar widths in the third tab of the chart wizard. Select the Chart Area tree node and then select General Properties. Changing the unit spacing will change the bar widths. You can also change them using script.

    function beforeGeneration( chart, context )
    {
    chart.setUnitSpacing(20);
    }
    var oldSpacing;
    function beforeDrawSeries( series, seriesRenderer, context )

    {
    oldSpacing = context.getChartInstance().getUnitSpacing();
    if( series.getSeriesIdentifier() == "series one" ){
    context.getChartInstance().setUnitSpacing(70);
    }
    }

    function afterDrawSeries( series, seriesRenderer, context )
    {
    context.getChartInstance().setUnitSpacing(oldSpacing);
    }

    Jason
  • Ele
    Ele
    edited December 31, 1969 #3
    Options
    Thanks Jason¡