Hi,
othman wrote:
Ingrid Halama wrote:
For each series there is one entry generated in the legend. The
displayed text is the label of the series and the displayed symbol is
the symbol fitting to the properties of the series. For example when you
have a series with label 'Series A' that is a thick blue line, the
legend entry will be a symbol showing a thick blue line followed by the
text 'Series A'. That is what most users want to have.
Ingrid
Ingrid, is it possible you describe me how to set the legend entries
programatically via chart2 API? (like i described in previous email)
i tried but couldn't figured this out.
thanks.
othman
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]