Dynamically add a marker line to a chart [message #725746] |
Thu, 15 September 2011 12:29  |
Eclipse User |
|
|
|
Hi,
I have a Chart with bar series. I would like place a vertical marker line on a point on the X axis to denote a cut-off point. Is there a way to do this in the chart script given that the cut-off point is not known until runtime. I can retrieve it from a global variable.
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Dynamically add a marker line to a chart [message #728654 is a reply to message #728527] |
Fri, 23 September 2011 11:35  |
Eclipse User |
|
|
|
Mike,
You can get the size of any the chart blocks (plot, legend, title etc)
but I am not certain how you would do the calculation.
Jason
On 9/23/2011 8:32 AM, Mike Wulkan wrote:
> Hi Jason,
>
> This almost works. The example works but when I applied this code to my
> actual chart the line was still out (to the right). So I went back and
> forth a million times to try to figure out what the difference was. I
> finally figured it out that it was the legend. In my actual chart code I
> had different place holder names for each of the series which I
> subsequently modified in my beforeDrawLegendItem script. One of the
> place holder names was long (eg., "Brobdingnagian"). The chart formatted
> based on the width of the legend as it was specified in the designer. At
> runtime the width of the legend was actually smaller which threw out the
> calculations for the marker.
>
> I have worked around this by changing the place holder names to
> something shorter since they don't actually display anyway, but for
> future reference, I was wondering if there was still a minor tweak to
> the code that would account for this?
|
|
|
Powered by
FUDForum. Page generated in 0.06716 seconds