Hi,
othman wrote:
Ingrid Halama wrote:
Yes, it is tricky. The DataSeries do consist of one or more
XLabeledDataSequence.
http://api.openoffice.org/docs/common/ref/com/sun/star/chart2/data/XLabeledDataSequence.html
Each XLabeledDataSequence could have a DataSequence for labels and one
for values (see methods get/setValues & get/setLabel).
http://api.openoffice.org/docs/common/ref/com/sun/star/chart2/data/DataSequence.html
When the property "Role" of the value-DataSequence matches a certain
string then
the label-DataSequence of the same LabeledDataSequence is taken as label
for the series and displayed in the legend.
That certain string for the property "Role" is defined by the chart
type. See method getRoleOfSequenceForSeriesLabel at interface XChartType.
So within a candlestick series search for the LabeledDataSequence where
the values have property "Role" set to "values-last" and set a new label
there using setLabel(). As parameter you need a XDataSequence.
To create a DataSequence use the method
createDataSequenceByRangeRepresentation() at the interface XDataProvider:
http://api.openoffice.org/docs/common/ref/com/sun/star/chart2/data/XDataProvider.html
You can retrieve the DataProvider with method getDataProvider() from the
chart document:
http://api.openoffice.org/docs/common/ref/com/sun/star/chart2/XChartDocument.html
Note that it is not possible to set an arbitrary string as label so far.
It is necessary to have one or more cells containing the string that
should be displayed (this is the same in all APIs and UserInterface).
Kind regards,
Ingrid
Thank you , that did the trick !
However there remains a small issue :
for candlestick chart only the series with Role "values-last" is displayed
in legend. it is labeled "Close".
so why the chart doesn't display the other candle series with roles
"values-max" ,"values-first" , "values-min" ?
it seems for candle chart only the "close" series are displayed in the
legend. is there a way to add the other candle series to legend entries ?
thanks much.
othman.
There is only one legend entry shown for one stock symbol because there
is only one line style used for all the values (high low close open).
You may try to trick around by adding series of chart type line without
any values but with a label. That should produce additional legend entries.
Kind regards,
Ingrid
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]