ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  MultiBar graph questions
Posted by Sethu on Aug-24-2013 01:40
Attachments:
Hi,
I have two questions regarding Multi-Bar charts. This is with respect to the sample chart
attached herewith.

1. How to reduce the width of the bars in this chart?

2. How to scale the Y-axis from 0 to 100 instead of the auto-scaling (default) based on the
input values?

Thanks in advance.

Sethu
sample_chart.png

  Re: MultiBar graph questions
Posted by Peter Kwan on Aug-24-2013 22:42
Hi Sethu,

1. You may use BarLayer.setBarGap to control the bar width. I think you may already have
a setBarGap method call in your code. It is because by default, there should be gaps
between all bars, but in your case, there is no gap between the "Self" and "Norm" bars. So
your code may already have a setBarGap method call to set the gap between the bars
within a bar group to Chart.TouchBar. If you also increase the gap between the bar groups,
the bars will become thinner. For example:

myBarLayer.setBarGap(0.5, Chart.TouchBar);


2. You may use Axis.setLinearScale to configure the axis scale. For example:

c.yAxis().setLinearScale(0, 100, 20);


Hope this can help.

Regards
Peter Kwan

  Re: MultiBar graph questions
Posted by Sethu on Aug-25-2013 15:49
That's exactly what I wanted. Thanks Peter!