1*b1cdbd2cSJim Jagielski/**************************************************************
2*b1cdbd2cSJim Jagielski *
3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski * distributed with this work for additional information
6*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski *
11*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski *
13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski * under the License.
19*b1cdbd2cSJim Jagielski *
20*b1cdbd2cSJim Jagielski *************************************************************/
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski#ifndef com_sun_star_chart2_DataSeries_idl
24*b1cdbd2cSJim Jagielski#define com_sun_star_chart2_DataSeries_idl
25*b1cdbd2cSJim Jagielski
26*b1cdbd2cSJim Jagielski#include <com/sun/star/beans/PropertySet.idl>
27*b1cdbd2cSJim Jagielski#include <com/sun/star/container/XIndexContainer.idl>
28*b1cdbd2cSJim Jagielski#include <com/sun/star/container/XContainer.idl>
29*b1cdbd2cSJim Jagielski#include <com/sun/star/style/XStyle.idl>
30*b1cdbd2cSJim Jagielski
31*b1cdbd2cSJim Jagielski//#include <com/sun/star/chart2/ChartTypeSupplier.idl>
32*b1cdbd2cSJim Jagielski#include <com/sun/star/chart2/CoordinateSystemSupplier.idl>
33*b1cdbd2cSJim Jagielski#include <com/sun/star/chart2/data/XDataSink.idl>
34*b1cdbd2cSJim Jagielski#include <com/sun/star/chart2/data/XDataSource.idl>
35*b1cdbd2cSJim Jagielski#include <com/sun/star/chart2/data/XDataSeries.idl>
36*b1cdbd2cSJim Jagielski#include <com/sun/star/chart2/XRegressionCurveContainer.idl>
37*b1cdbd2cSJim Jagielski
38*b1cdbd2cSJim Jagielskimodule com
39*b1cdbd2cSJim Jagielski{
40*b1cdbd2cSJim Jagielskimodule sun
41*b1cdbd2cSJim Jagielski{
42*b1cdbd2cSJim Jagielskimodule star
43*b1cdbd2cSJim Jagielski{
44*b1cdbd2cSJim Jagielskimodule chart2
45*b1cdbd2cSJim Jagielski{
46*b1cdbd2cSJim Jagielski
47*b1cdbd2cSJim Jagielski    // NOTES
48*b1cdbd2cSJim Jagielski
49*b1cdbd2cSJim Jagielski    // kombinierbarkeit - data series combiner (andere Komponente?)
50*b1cdbd2cSJim Jagielski    //
51*b1cdbd2cSJim Jagielski    // coordinatesystem-supplier
52*b1cdbd2cSJim Jagielski    //
53*b1cdbd2cSJim Jagielski    // chart-typ ? property string rendererServiceName
54*b1cdbd2cSJim Jagielski
55*b1cdbd2cSJim Jagielski
56*b1cdbd2cSJim Jagielski/** reflects the model data of the object that has all the information
57*b1cdbd2cSJim Jagielski    for a <type>DataRenderer</type> to create a visible data series in
58*b1cdbd2cSJim Jagielski    a chart.
59*b1cdbd2cSJim Jagielski
60*b1cdbd2cSJim Jagielski    <p>It combines one or more <type>DataSequence</type>s which are
61*b1cdbd2cSJim Jagielski    interpreted by evaluating their role-string.</p>
62*b1cdbd2cSJim Jagielski
63*b1cdbd2cSJim Jagielski    @see DataSequenceRole
64*b1cdbd2cSJim Jagielski  */
65*b1cdbd2cSJim Jagielskiservice DataSeries
66*b1cdbd2cSJim Jagielski{
67*b1cdbd2cSJim Jagielski    /** allows to connect a CoordinateSystem to a DataSeries
68*b1cdbd2cSJim Jagielski     */
69*b1cdbd2cSJim Jagielski//     service CoordinateSystemSupplier;
70*b1cdbd2cSJim Jagielski
71*b1cdbd2cSJim Jagielski//    service ChartTypeSupplier;
72*b1cdbd2cSJim Jagielski    /** the property interface by which the properties of all
73*b1cdbd2cSJim Jagielski        supported services are exchanged
74*b1cdbd2cSJim Jagielski    */
75*b1cdbd2cSJim Jagielski    service ::com::sun::star::beans::PropertySet;
76*b1cdbd2cSJim Jagielski
77*b1cdbd2cSJim Jagielski    /** these properties serve as default for data points.
78*b1cdbd2cSJim Jagielski
79*b1cdbd2cSJim Jagielski        <p>So, an attribute for a data point comes from one point in
80*b1cdbd2cSJim Jagielski        the following hierarchy:</p>
81*b1cdbd2cSJim Jagielski
82*b1cdbd2cSJim Jagielski        <ul>
83*b1cdbd2cSJim Jagielski         <li>default value of data series</li>
84*b1cdbd2cSJim Jagielski         <li>value from style of data series (if a style was set)</li>
85*b1cdbd2cSJim Jagielski         <li>value from hard attribute of data series (set with setPropertyValue)</li>
86*b1cdbd2cSJim Jagielski         <li>value from style of data point (if a style was set)</li>
87*b1cdbd2cSJim Jagielski         <li>value from hard attribute of data point (set with setPropertyValue)</li>
88*b1cdbd2cSJim Jagielski        </ul>
89*b1cdbd2cSJim Jagielski     */
90*b1cdbd2cSJim Jagielski    service DataPointProperties;
91*b1cdbd2cSJim Jagielski
92*b1cdbd2cSJim Jagielski    // ----------------------------------------------------------------------
93*b1cdbd2cSJim Jagielski
94*b1cdbd2cSJim Jagielski    /** allows setting a coordinate-system
95*b1cdbd2cSJim Jagielski     */
96*b1cdbd2cSJim Jagielski    interface XDataSeries;
97*b1cdbd2cSJim Jagielski
98*b1cdbd2cSJim Jagielski    /** allows attaching data sequences to a series.
99*b1cdbd2cSJim Jagielski     */
100*b1cdbd2cSJim Jagielski    interface data::XDataSink;
101*b1cdbd2cSJim Jagielski
102*b1cdbd2cSJim Jagielski    /** allows querying the data that was set.
103*b1cdbd2cSJim Jagielski     */
104*b1cdbd2cSJim Jagielski    interface data::XDataSource;
105*b1cdbd2cSJim Jagielski
106*b1cdbd2cSJim Jagielski    /** gives access to the data points contained in a data series.
107*b1cdbd2cSJim Jagielski
108*b1cdbd2cSJim Jagielski        <p>The objects returned by the
109*b1cdbd2cSJim Jagielski        <type scope="com::sun::star::container">XIndexAccess</type>
110*b1cdbd2cSJim Jagielski        are of type
111*b1cdbd2cSJim Jagielski        <type scope="com::sun::star::beans">XPropertySet</type>
112*b1cdbd2cSJim Jagielski        and support the service
113*b1cdbd2cSJim Jagielski        <type>DataPoint</type>.
114*b1cdbd2cSJim Jagielski    */
115*b1cdbd2cSJim Jagielski//     interface ::com::sun::star::container::XIndexContainer;
116*b1cdbd2cSJim Jagielski
117*b1cdbd2cSJim Jagielski    /** establishes a broadcaster-listener mechanism for the
118*b1cdbd2cSJim Jagielski        <type scope="com::sun::star::container">XIndexContainer</type>
119*b1cdbd2cSJim Jagielski        to keep changes and the property
120*b1cdbd2cSJim Jagielski        <member>DataSeries::AttributedDataPoints</member> in sync.
121*b1cdbd2cSJim Jagielski     */
122*b1cdbd2cSJim Jagielski//     interface ::com::sun::star::container::XContainer;
123*b1cdbd2cSJim Jagielski
124*b1cdbd2cSJim Jagielski    /** Holds regression curves (aka trend-lines) for a data series.
125*b1cdbd2cSJim Jagielski     */
126*b1cdbd2cSJim Jagielski    [optional] interface XRegressionCurveContainer;
127*b1cdbd2cSJim Jagielski
128*b1cdbd2cSJim Jagielski    // ----------------------------------------------------------------------
129*b1cdbd2cSJim Jagielski
130*b1cdbd2cSJim Jagielski    /** This service will be used to render this data series.
131*b1cdbd2cSJim Jagielski
132*b1cdbd2cSJim Jagielski        <p>This service name can be used to determine which DataSeries
133*b1cdbd2cSJim Jagielski        are of the same type.</p>
134*b1cdbd2cSJim Jagielski
135*b1cdbd2cSJim Jagielski        <p>The result of the
136*b1cdbd2cSJim Jagielski        <member>DataSeries::DataSequenceRoles</member> depends on the
137*b1cdbd2cSJim Jagielski        renderer service set here.</p>
138*b1cdbd2cSJim Jagielski     */
139*b1cdbd2cSJim Jagielski    // stored at the DataSeriesGroup now
140*b1cdbd2cSJim Jagielski//     [property] string                             DataRendererServiceName;
141*b1cdbd2cSJim Jagielski
142*b1cdbd2cSJim Jagielski    /** a sequence of indexes denoting which data points have set
143*b1cdbd2cSJim Jagielski        properties that differ from the default.
144*b1cdbd2cSJim Jagielski
145*b1cdbd2cSJim Jagielski        <p>The default values are determined by the properties set at
146*b1cdbd2cSJim Jagielski        the <member>DataPointProperties</member> of the data
147*b1cdbd2cSJim Jagielski        series.</p>
148*b1cdbd2cSJim Jagielski
149*b1cdbd2cSJim Jagielski        <p>If the sequence is empty, that means that all data points
150*b1cdbd2cSJim Jagielski        look alike.  They are formatted using the propery values set
151*b1cdbd2cSJim Jagielski        in the data series.</p>
152*b1cdbd2cSJim Jagielski
153*b1cdbd2cSJim Jagielski        <p>The indexes in this sequence match the indexes used by the
154*b1cdbd2cSJim Jagielski        <type>XIndexContainer</type>.</p>
155*b1cdbd2cSJim Jagielski
156*b1cdbd2cSJim Jagielski        <p>This property is especially useful for large data series
157*b1cdbd2cSJim Jagielski        with only some formatted data points, because you do not have
158*b1cdbd2cSJim Jagielski        to iterate over all elements.</p>
159*b1cdbd2cSJim Jagielski     */
160*b1cdbd2cSJim Jagielski    [readonly, optional, property] sequence< long > AttributedDataPoints;
161*b1cdbd2cSJim Jagielski
162*b1cdbd2cSJim Jagielski    /** indicates wether this series should be stacked with respect to the previous series.
163*b1cdbd2cSJim Jagielski    */
164*b1cdbd2cSJim Jagielski    [property] StackingDirection StackingDirection;
165*b1cdbd2cSJim Jagielski
166*b1cdbd2cSJim Jagielski    /** If <TRUE/>, the data points of this series get different
167*b1cdbd2cSJim Jagielski        colors by default, like in a pie chart.
168*b1cdbd2cSJim Jagielski     */
169*b1cdbd2cSJim Jagielski    [optional, property] boolean                    VaryColorsByPoint;
170*b1cdbd2cSJim Jagielski
171*b1cdbd2cSJim Jagielski    /** This property describes wether the series should be shown at
172*b1cdbd2cSJim Jagielski        the main value axis or at the secondary value axis.  Having
173*b1cdbd2cSJim Jagielski        this property not set or setting it to 0 means that this data
174*b1cdbd2cSJim Jagielski        series will be scaled at the primary y-axis ( of the
175*b1cdbd2cSJim Jagielski        coordinate system in which this series is hosted ).
176*b1cdbd2cSJim Jagielski
177*b1cdbd2cSJim Jagielski        <p>Setting this property to 1 means that this series should be
178*b1cdbd2cSJim Jagielski        scaled at the secondary y-axis.  If there is no secondary axis
179*b1cdbd2cSJim Jagielski        the main axis should be used for scaling instead.</p>
180*b1cdbd2cSJim Jagielski
181*b1cdbd2cSJim Jagielski        <p>If you want to scale a series at a different x or z axis
182*b1cdbd2cSJim Jagielski        you need to create an additional coordinate system and host
183*b1cdbd2cSJim Jagielski        this series there.</p>
184*b1cdbd2cSJim Jagielski    */
185*b1cdbd2cSJim Jagielski    [optional, property] long                       AttachedAxisIndex;
186*b1cdbd2cSJim Jagielski};
187*b1cdbd2cSJim Jagielski
188*b1cdbd2cSJim Jagielski} ; // chart2
189*b1cdbd2cSJim Jagielski} ; // com
190*b1cdbd2cSJim Jagielski} ; // sun
191*b1cdbd2cSJim Jagielski} ; // star
192*b1cdbd2cSJim Jagielski
193*b1cdbd2cSJim Jagielski
194*b1cdbd2cSJim Jagielski#endif
195