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

Message ListMessage List     Post MessagePost Message

  Is this bar-graph possible?
Posted by Frank on Jun-18-2019 16:44
Attachments:
Hello Peter,

Thank you for helping us out. Our question is whether this graph can be made using ChartDirector.

Thanks in advance,

Frank
graph.jpg

  Re: Is this bar-graph possible?
Posted by Peter Kwan on Jun-19-2019 02:06
Hi Frank,

Yes, there are several methods to do this. For example:

- You can use a horizontal multi-color box-whisker layer to create all the bars. For your case, you just need to arrays for the box-top and box-bottom, and set the other arrays to empty arrays.

https://www.advsofteng.com/doc/cdcom.htm#hboxwhisker.htm

- You can use BaseBoxLayer.setRoundedCorners to set one end of the boxes to use rounded corners.

https://www.advsofteng.com/doc/cdcom.htm#BaseBoxLayer.setRoundedCorners.htm

- For the numeric labels, you can add a scatter layer with invisible scatter symbols (eg. a complete transparent scatter symbol) at the positions you want the labels to appear. You can then add the numbers as an extra field to the scatter layer, and configure the scatter layer to use the extra field as the labels. For the numbers, you can configure the labels to center-align to the scatter points. See:

https://www.advsofteng.com/doc/cdcom.htm#BaseChart.addExtraField.htm
https://www.advsofteng.com/doc/cdcom.htm#Layer.setDataLabelFormat.htm
https://www.advsofteng.com/doc/cdcom.htm#Layer.setDataLabelStyle.htm

- Similarly, you can add a scatter layer with invisible symbols for the left-aligned text labels, and another scatter layer for the right-aligned labels.

Regards
Peter Kwan

  Re: Is this bar-graph possible?
Posted by Frank on Jun-20-2019 21:18
Peter, thank you for your help! We appreciate it very much.

Kind regards,

Frank.