Charting API: Legends and Series Identifiers: HOW TO show some but not all identifiers? [message #158874] |
Fri, 05 May 2006 14:58  |
Eclipse User |
|
|
|
I want to show some but not all series identifiers in my legend.
I am creating a chart with several pairs of scatter series that overlap on
the last and first point respectively.
Each pair (a,b) is displayed as one continuous line (more or less) in the
chart.
Something like: x__x__x__x__x__x__x__x...x...x...x...x...x (except curved
and in color)
The x's being points, the underlines series a and the periods series b.
The idea is to simulate a single curve that changes line style and/or point
markers.
I have configured the legend to show the series identifiers:
cwaScat.getLegend( ).setVisible( true );
cwaScat.getLegend().setItemType(LegendItemType.SERIES_LITERA L);
Now , I only want to show series identifiers in the legend for the a series
and not the b series.
For the a series I say:
a.setSeriesIdentifier(seriesNames[i]);
For the b series I have tried:
b.setSeriesIdentifier(seriesNames[i]); Result: a duplicate series ID
in the legend for each (a,b) pair
b.setSeriesIdentifier(null); Result: the word
'null' as a series ID (duplicated for each b series)
as well as leaving it undefined Result: the word
'undefined' as a series ID (duplicated for each b series)
Thanks in advance,
-DWolfe
|
|
|
Re: Charting API: Legends and Series Identifiers: HOW TO show some but not all identifiers? [message #158891 is a reply to message #158874] |
Fri, 05 May 2006 15:37  |
Eclipse User |
|
|
|
Hi Dave,
You can set an empty string: ""
Is it what you need? It will still show the legend graphics, but there is no
way to avoid it.
Thanks,
David
"Dave Wolfe" <ibmchartman@comcast.net> wrote in message
news:e3g78r$c4r$1@utils.eclipse.org...
>I want to show some but not all series identifiers in my legend.
>
> I am creating a chart with several pairs of scatter series that overlap on
> the last and first point respectively.
> Each pair (a,b) is displayed as one continuous line (more or less) in the
> chart.
> Something like: x__x__x__x__x__x__x__x...x...x...x...x...x (except curved
> and in color)
> The x's being points, the underlines series a and the periods series b.
> The idea is to simulate a single curve that changes line style and/or
> point markers.
>
> I have configured the legend to show the series identifiers:
> cwaScat.getLegend( ).setVisible( true );
> cwaScat.getLegend().setItemType(LegendItemType.SERIES_LITERA L);
>
> Now , I only want to show series identifiers in the legend for the a
> series and not the b series.
> For the a series I say:
> a.setSeriesIdentifier(seriesNames[i]);
> For the b series I have tried:
> b.setSeriesIdentifier(seriesNames[i]); Result: a duplicate series ID
> in the legend for each (a,b) pair
> b.setSeriesIdentifier(null); Result: the word
> 'null' as a series ID (duplicated for each b series)
> as well as leaving it undefined Result: the word
> 'undefined' as a series ID (duplicated for each b series)
>
> Thanks in advance,
>
> -DWolfe
>
|
|
|
Powered by
FUDForum. Page generated in 0.02789 seconds