|
Bubble chart overlapping labels |
Posted by Ben J on Oct-14-2009 23:38 |
|
Hi,
I am drawing a reasonably dense bubble chart with
each point labeled by text. Often the labels overlap,
making them hard to read. What I would like are the
labels set without overlapping and a line to the
appropriate bubble. Is this achievanle?
Thanks |
Re: Bubble chart overlapping labels |
Posted by Peter Kwan on Oct-15-2009 01:09 |
|
Hi Ben,
ChartDirector cannnot automatically position the labels the way you want.
You can position the labels with your own code if you like. They key is that your code need to know where to put each label. If your code can compute this information, one method is to create another transparent scatter layer, in which the scatter points are the position of the labels, and you may attach the labels to the transparent scatter layer instead of the bubble layer.
Hope this can help.
Regards
Peter Kwan |
Re: Bubble chart overlapping labels |
Posted by Ben J on Oct-16-2009 11:39 |
|
Thanks for the quick reply,
I was assuming as much.
I believe I read a reply somewhere that it is possible to connect the points in these two layers together using lines? Is this a simple task?
-Ben |
Re: Bubble chart overlapping labels |
Posted by Peter Kwan on Oct-16-2009 22:49 |
|
Hi Ben,
There are several methods. May be you can considering something like (in VB/VBScript):
.... add all the layers ....
'auto-scale axis
Call c.layout()
'join the data points with the label points
For i = 0 To Ubound(myDataPointsX)
Call c.addLine(c.getXCoor(myDataPointsX(i)), c.getYCoor(myDataPointsY(i)), c.getXCoor(myLabelPointsX(i)), c.getYCoor(myLabelPointsY(i)), &H000000).setZOrder(cd.GridLinesZ)
Next
Hope this can help.
Regards
Peter Kwan |
|