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

Message ListMessage List     Post MessagePost Message

  PieChart.setLabelPos not working in NET 5.1 ???
Posted by Rich B on Oct-25-2013 22:46
Attachments:
EVERYTHING ELSE in my code works GREAT with your charting app - with one exception.
Regardless of the value I pass for "pos" to PieChart.setLabelPos, the label positions
always go to their default location.

The attached image is what I get regardless of whether I call:

objPieChart.setLabelPos(-50, 0)

or

objPieChart.setLabelPos(250, 0)

There is no difference. I know this line of code is working and being executed, because
when I change the second parameter to

objPieChart.setLabelPos(250, 16711680)

(FF0000 in hex) I get a red sector line (which is what I'd expect) instead of a black line.

I have v5.1 of Chart Director. Is this a known issue? If so, is there a fix? OR, is there
something simple I'm missing.

If ORDER is important, right after I call objPieChart.setData(), I call --

objPieChart.setLabelFormat(mChartOptions.AxisXLabelFormat)

objPieChart.setLabelPos(mChartOptions.PieSectorLabelPosition,
mChartOptions.PieSectorLabelColor)

objPieChart.setLabelStyle(mChartOptions.AxisXTitleFont,
mChartOptions.AxisXTitleFontSize,
mChartOptions.AxisXTitleFontColor).setBackground(&HFF000000, &HFF000000)

objPieChart.setLabelLayout(ChartDirector.Chart.SideLayout)

PLEASE HELP!!
BSPChart.png

  Re: PieChart.setLabelPos not working in NET 5.1 ???
Posted by Peter Kwan on Oct-26-2013 00:44
Hi Rich,

The "setLabelPos(250, 0)" sets the label offset to 250. Then your code calls "setLabelLayout(ChartDirector.Chart.SideLayout)". According to ChartDirector documentation, "setLabelLayout(ChartDirector.Chart.SideLayout)" will set the label offset to -1 (and therefore overwrites the previous offset configuration), and it means the offset is automatically determined. So the offset will be automatically determined.

For your case, if you have to set the label offset to 250, you may use use:

objPieChart.setLabelLayout(ChartDirector.Chart.SideLayout, 250)

There is no need to use setLabelPos.

Hope this can help.

Regards
Peter Kwan

  Re: PieChart.setLabelPos not working in NET 5.1 ???
Posted by Rich B on Oct-26-2013 00:48
I suspected it was my fault.

THANK YOU!!!!