Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : :
20 : :
21 : : #include "CandleStickChart.hxx"
22 : : #include "ShapeFactory.hxx"
23 : : #include "CommonConverters.hxx"
24 : : #include "ObjectIdentifier.hxx"
25 : : #include "LabelPositionHelper.hxx"
26 : : #include "BarPositionHelper.hxx"
27 : : #include "macros.hxx"
28 : : #include "VLegendSymbolFactory.hxx"
29 : : #include "FormattedStringHelper.hxx"
30 : : #include "DataSeriesHelper.hxx"
31 : : #include "DateHelper.hxx"
32 : : #include <rtl/math.hxx>
33 : : #include <editeng/unoprnms.hxx>
34 : :
35 : : //.............................................................................
36 : : namespace chart
37 : : {
38 : : //.............................................................................
39 : : using namespace ::com::sun::star;
40 : : using namespace ::rtl::math;
41 : : using namespace ::com::sun::star::chart2;
42 : : using ::com::sun::star::uno::Reference;
43 : : using ::rtl::OUString;
44 : :
45 : : //-----------------------------------------------------------------------------
46 : : //-----------------------------------------------------------------------------
47 : : //-----------------------------------------------------------------------------
48 : :
49 : 4 : CandleStickChart::CandleStickChart( const uno::Reference<XChartType>& xChartTypeModel
50 : : , sal_Int32 nDimensionCount )
51 : : : VSeriesPlotter( xChartTypeModel, nDimensionCount )
52 [ + - ][ + - ]: 4 : , m_pMainPosHelper( new BarPositionHelper() )
53 : : {
54 [ + - ]: 4 : PlotterBase::m_pPosHelper = m_pMainPosHelper;
55 [ + - ]: 4 : VSeriesPlotter::m_pMainPosHelper = m_pMainPosHelper;
56 : 4 : }
57 : :
58 : 4 : CandleStickChart::~CandleStickChart()
59 : : {
60 [ + - ][ + - ]: 4 : delete m_pMainPosHelper;
61 [ - + ]: 8 : }
62 : :
63 : : //-------------------------------------------------------------------------
64 : : // MinimumAndMaximumSupplier
65 : : //-------------------------------------------------------------------------
66 : :
67 : 80 : bool CandleStickChart::isSeperateStackingForDifferentSigns( sal_Int32 /* nDimensionIndex */ )
68 : : {
69 : 80 : return false;
70 : : }
71 : :
72 : : //-----------------------------------------------------------------
73 : : //-----------------------------------------------------------------
74 : : //-----------------------------------------------------------------
75 : :
76 : 24 : LegendSymbolStyle CandleStickChart::getLegendSymbolStyle()
77 : : {
78 : 24 : return LegendSymbolStyle_LINE;
79 : : }
80 : :
81 : 4 : drawing::Direction3D CandleStickChart::getPreferredDiagramAspectRatio() const
82 : : {
83 : 4 : return drawing::Direction3D(-1,-1,-1);
84 : : }
85 : :
86 : 20 : void CandleStickChart::addSeries( VDataSeries* pSeries, sal_Int32 /* zSlot */, sal_Int32 xSlot, sal_Int32 ySlot )
87 : : {
88 : : //ignore y stacking for candle stick chart
89 : 20 : VSeriesPlotter::addSeries( pSeries, 0, xSlot, ySlot );
90 : 20 : }
91 : :
92 : 4 : void CandleStickChart::createShapes()
93 : : {
94 [ + - ][ + - ]: 4 : if( m_aZSlots.begin() == m_aZSlots.end() ) //no series
95 : : return;
96 : :
97 [ + - ]: 4 : if( m_nDimension!=2 )
98 : : return;
99 : :
100 : : OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"CandleStickChart is not proper initialized");
101 [ + - ][ + - ]: 4 : if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()))
[ - + ][ + - ]
102 : : return;
103 : :
104 : : //the text labels should be always on top of the other series shapes
105 : : //therefore create an own group for the texts to move them to front
106 : : //(because the text group is created after the series group the texts are displayed on top)
107 : :
108 : : uno::Reference< drawing::XShapes > xSeriesTarget(
109 [ + - ]: 4 : createGroupShape( m_xLogicTarget,rtl::OUString() ));
110 : : uno::Reference< drawing::XShapes > xLossTarget(
111 : : createGroupShape( m_xLogicTarget, ObjectIdentifier::createClassifiedIdentifier(
112 [ + - ][ + - ]: 4 : OBJECTTYPE_DATA_STOCK_LOSS, rtl::OUString() )));
113 : : uno::Reference< drawing::XShapes > xGainTarget(
114 : : createGroupShape( m_xLogicTarget, ObjectIdentifier::createClassifiedIdentifier(
115 [ + - ][ + - ]: 4 : OBJECTTYPE_DATA_STOCK_GAIN, rtl::OUString() )));
116 : : uno::Reference< drawing::XShapes > xTextTarget(
117 [ + - ]: 4 : m_pShapeFactory->createGroup2D( m_xFinalTarget,rtl::OUString() ));
118 : :
119 : : //---------------------------------------------
120 : : //check necessary here that different Y axis can not be stacked in the same group? ... hm?
121 : :
122 : 4 : bool bJapaneseStyle=true;//@todo is this the correct default?
123 : 4 : bool bShowFirst = true;//is only important if bJapaneseStyle == false
124 [ + - ][ + - ]: 4 : tNameSequence aWhiteBox_Names, aBlackBox_Names;
125 [ + - ][ + - ]: 4 : tAnySequence aWhiteBox_Values, aBlackBox_Values;
126 : : try
127 : : {
128 [ + - ]: 4 : if( m_xChartTypeModelProps.is() )
129 : : {
130 [ + - ][ + - ]: 4 : m_xChartTypeModelProps->getPropertyValue( C2U( "ShowFirst" ) ) >>= bShowFirst;
[ + - ]
131 : :
132 [ + - ]: 4 : uno::Reference< beans::XPropertySet > xWhiteDayProps(0);
133 [ + - ]: 4 : uno::Reference< beans::XPropertySet > xBlackDayProps(0);
134 [ + - ][ + - ]: 4 : m_xChartTypeModelProps->getPropertyValue( C2U( "Japanese" ) ) >>= bJapaneseStyle;
[ + - ]
135 [ + - ][ + - ]: 4 : m_xChartTypeModelProps->getPropertyValue( C2U( "WhiteDay" ) ) >>= xWhiteDayProps;
[ + - ][ + - ]
136 [ + - ][ + - ]: 4 : m_xChartTypeModelProps->getPropertyValue( C2U( "BlackDay" ) ) >>= xBlackDayProps;
[ + - ][ + - ]
137 : :
138 [ + - ]: 4 : tPropertyNameValueMap aWhiteBox_Map;
139 [ + - ][ + - ]: 4 : PropertyMapper::getValueMap( aWhiteBox_Map, PropertyMapper::getPropertyNameMapForFillAndLineProperties(), xWhiteDayProps );
140 [ + - ]: 4 : PropertyMapper::getMultiPropertyListsFromValueMap( aWhiteBox_Names, aWhiteBox_Values, aWhiteBox_Map );
141 : :
142 [ + - ]: 4 : tPropertyNameValueMap aBlackBox_Map;
143 [ + - ][ + - ]: 4 : PropertyMapper::getValueMap( aBlackBox_Map, PropertyMapper::getPropertyNameMapForFillAndLineProperties(), xBlackDayProps );
144 [ + - ][ # # ]: 4 : PropertyMapper::getMultiPropertyListsFromValueMap( aBlackBox_Names, aBlackBox_Values, aBlackBox_Map );
145 : : }
146 : : }
147 [ # # ]: 0 : catch( const uno::Exception& e )
148 : : {
149 : : ASSERT_EXCEPTION( e );
150 : : }
151 : :
152 : : //(@todo maybe different iteration for breaks in axis ?)
153 : 4 : sal_Int32 nStartIndex = 0;
154 [ + - ]: 4 : sal_Int32 nEndIndex = VSeriesPlotter::getPointCount();
155 : 4 : double fLogicZ = 1.5;//as defined
156 : : //=============================================================================
157 : : //iterate through all x values per indices
158 [ + + ]: 16 : for( sal_Int32 nIndex = nStartIndex; nIndex < nEndIndex; nIndex++ )
159 : : {
160 : 12 : ::std::vector< ::std::vector< VDataSeriesGroup > >::iterator aZSlotIter = m_aZSlots.begin();
161 [ + - ]: 12 : const ::std::vector< ::std::vector< VDataSeriesGroup > >::const_iterator aZSlotEnd = m_aZSlots.end();
162 : : //=============================================================================
163 [ + - ][ + + ]: 24 : for( sal_Int32 nZ=0; aZSlotIter != aZSlotEnd; ++aZSlotIter, nZ++ )
164 : : {
165 : 12 : ::std::vector< VDataSeriesGroup >::iterator aXSlotIter = aZSlotIter->begin();
166 [ + - ]: 12 : const ::std::vector< VDataSeriesGroup >::const_iterator aXSlotEnd = aZSlotIter->end();
167 : :
168 : 12 : sal_Int32 nAttachedAxisIndex = 0;
169 : 12 : BarPositionHelper* pPosHelper = m_pMainPosHelper;
170 [ + - ][ + - ]: 12 : if( aXSlotIter != aXSlotEnd )
171 : : {
172 [ + - ]: 12 : nAttachedAxisIndex = aXSlotIter->getAttachedAxisIndexForFirstSeries();
173 : : //2ND_AXIS_IN_BARS so far one can assume to have the same plotter for each z slot
174 [ + - ][ - + ]: 12 : pPosHelper = dynamic_cast<BarPositionHelper*>(&( this->getPlottingPositionHelper( nAttachedAxisIndex ) ) );
175 [ - + ]: 12 : if(!pPosHelper)
176 : 0 : pPosHelper = m_pMainPosHelper;
177 : : }
178 [ + - ]: 12 : PlotterBase::m_pPosHelper = pPosHelper;
179 : :
180 : : //update/create information for current group
181 [ + - ]: 12 : pPosHelper->updateSeriesCount( aZSlotIter->size() );
182 : : //=============================================================================
183 : : //iterate through all x slots in this category
184 [ + - ][ + + ]: 72 : for( double fSlotX=0; aXSlotIter != aXSlotEnd; ++aXSlotIter, fSlotX+=1.0 )
185 : : {
186 : 60 : ::std::vector< VDataSeries* >* pSeriesList = &(aXSlotIter->m_aSeriesVector);
187 : :
188 [ + - ]: 60 : ::std::vector< VDataSeries* >::const_iterator aSeriesIter = pSeriesList->begin();
189 [ + - ]: 60 : const ::std::vector< VDataSeries* >::const_iterator aSeriesEnd = pSeriesList->end();
190 [ + - ]: 60 : aSeriesIter = pSeriesList->begin();
191 : : //=============================================================================
192 : : //iterate through all series in this x slot
193 [ + - ][ + + ]: 120 : for( ; aSeriesIter != aSeriesEnd; ++aSeriesIter )
194 : : {
195 : : //collect data point information (logic coordinates, style ):
196 [ + - ]: 60 : double fUnscaledX = (*aSeriesIter)->getXValue( nIndex );
197 [ + - ][ + - ]: 60 : if( m_pExplicitCategoriesProvider && m_pExplicitCategoriesProvider->isDateAxis() )
[ - + ][ - + ]
198 [ # # ]: 0 : fUnscaledX = DateHelper::RasterizeDateValue( fUnscaledX, m_aNullDate, m_nTimeResolution );
199 [ + - ][ + - ]: 60 : if(fUnscaledX<pPosHelper->getLogicMinX() || fUnscaledX>pPosHelper->getLogicMaxX())
[ + - ][ - + ]
[ - + ]
200 : 0 : continue;//point not visible
201 [ + - ]: 60 : double fScaledX = pPosHelper->getScaledSlotPos( fUnscaledX, fSlotX );
202 : :
203 [ + - ]: 60 : double fUnscaledY_First = (*aSeriesIter)->getY_First( nIndex );
204 [ + - ]: 60 : double fUnscaledY_Last = (*aSeriesIter)->getY_Last( nIndex );
205 [ + - ]: 60 : double fUnscaledY_Min = (*aSeriesIter)->getY_Min( nIndex );
206 [ + - ]: 60 : double fUnscaledY_Max = (*aSeriesIter)->getY_Max( nIndex );
207 : :
208 : 60 : bool bBlack=false;
209 [ - + ]: 60 : if(fUnscaledY_Last<=fUnscaledY_First)
210 : : {
211 : 0 : std::swap(fUnscaledY_First,fUnscaledY_Last);
212 : 0 : bBlack=true;
213 : : }
214 [ + + ]: 60 : if(fUnscaledY_Max<fUnscaledY_Min)
215 : 20 : std::swap(fUnscaledY_Min,fUnscaledY_Max);
216 : : //transformation 3) -> 4)
217 [ + - ]: 60 : double fHalfScaledWidth = pPosHelper->getScaledSlotWidth()/2.0;
218 : :
219 : 60 : double fScaledY_First(fUnscaledY_First);
220 : 60 : double fScaledY_Last(fUnscaledY_Last);
221 : 60 : double fScaledY_Min(fUnscaledY_Min);
222 : 60 : double fScaledY_Max(fUnscaledY_Max);
223 [ + - ]: 60 : pPosHelper->clipLogicValues( 0,&fScaledY_First,0 );
224 [ + - ]: 60 : pPosHelper->clipLogicValues( 0,&fScaledY_Last,0 );
225 [ + - ]: 60 : pPosHelper->clipLogicValues( 0,&fScaledY_Min,0 );
226 [ + - ]: 60 : pPosHelper->clipLogicValues( 0,&fScaledY_Max,0 );
227 [ + - ]: 60 : pPosHelper->doLogicScaling( 0,&fScaledY_First,0 );
228 [ + - ]: 60 : pPosHelper->doLogicScaling( 0,&fScaledY_Last,0 );
229 [ + - ]: 60 : pPosHelper->doLogicScaling( 0,&fScaledY_Min,0 );
230 [ + - ]: 60 : pPosHelper->doLogicScaling( 0,&fScaledY_Max,0 );
231 : :
232 [ + - ]: 60 : drawing::Position3D aPosLeftFirst( pPosHelper->transformScaledLogicToScene( fScaledX-fHalfScaledWidth, fScaledY_First ,0 ,true ) );
233 [ + - ]: 60 : drawing::Position3D aPosRightLast( pPosHelper->transformScaledLogicToScene( fScaledX+fHalfScaledWidth, fScaledY_Last ,0 ,true ) );
234 [ + - ]: 60 : drawing::Position3D aPosMiddleFirst( pPosHelper->transformScaledLogicToScene( fScaledX, fScaledY_First ,0 ,true ) );
235 [ + - ]: 60 : drawing::Position3D aPosMiddleLast( pPosHelper->transformScaledLogicToScene( fScaledX, fScaledY_Last ,0 ,true ) );
236 [ + - ]: 60 : drawing::Position3D aPosMiddleMinimum( pPosHelper->transformScaledLogicToScene( fScaledX, fScaledY_Min ,0 ,true ) );
237 [ + - ]: 60 : drawing::Position3D aPosMiddleMaximum( pPosHelper->transformScaledLogicToScene( fScaledX, fScaledY_Max ,0 ,true ) );
238 : :
239 : 60 : uno::Reference< drawing::XShapes > xLossGainTarget( xGainTarget );
240 [ - + ]: 60 : if(bBlack)
241 [ # # ]: 0 : xLossGainTarget = xLossTarget;
242 : :
243 [ + - ]: 60 : uno::Reference< beans::XPropertySet > xPointProp( (*aSeriesIter)->getPropertiesOfPoint( nIndex ));
244 [ + - ]: 60 : uno::Reference< drawing::XShapes > xPointGroupShape_Shapes(0);
245 : : {
246 [ + - ][ + - ]: 60 : rtl::OUString aPointCID = ObjectIdentifier::createPointCID( (*aSeriesIter)->getPointCID_Stub(), nIndex );
247 [ + - ]: 60 : uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes( getSeriesGroupShape(*aSeriesIter, xSeriesTarget) );
248 [ + - ][ + - ]: 60 : xPointGroupShape_Shapes = createGroupShape(xSeriesGroupShape_Shapes,aPointCID);
249 : : }
250 : :
251 : : //create min-max line
252 [ + - ][ + - ]: 60 : if( isValidPosition(aPosMiddleMinimum) && isValidPosition(aPosMiddleMaximum) )
[ + + ][ + + ]
[ + - ]
253 : : {
254 [ + - ]: 48 : uno::Reference< drawing::XShape > xShape( m_xShapeFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
255 [ + - ][ + - ]: 48 : "com.sun.star.drawing.PolyLineShape" ) ) ), uno::UNO_QUERY );
[ + - ]
256 [ + - ][ + - ]: 48 : xPointGroupShape_Shapes->add(xShape);
257 [ + - ]: 48 : uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY );
258 [ + - ]: 48 : if(xProp.is())
259 : : {
260 [ + - ]: 48 : drawing::PolyPolygonShape3D aPoly;
261 : 48 : sal_Int32 nLineIndex =0;
262 [ + - ]: 48 : AddPointToPoly( aPoly, aPosMiddleMinimum, nLineIndex);
263 [ + - ]: 48 : AddPointToPoly( aPoly, aPosMiddleMaximum, nLineIndex);
264 [ + - ][ + - ]: 48 : xProp->setPropertyValue( C2U( UNO_NAME_POLYPOLYGON ), uno::makeAny( PolyToPointSequence(aPoly) ) );
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ]
265 : : }
266 [ + - ][ + - ]: 48 : this->setMappedProperties( xShape, xPointProp, PropertyMapper::getPropertyNameMapForLineSeriesProperties() );
267 : : }
268 : :
269 : : //create first-last shape
270 [ - + ][ # # ]: 60 : if(bJapaneseStyle && isValidPosition(aPosLeftFirst) && isValidPosition(aPosRightLast) )
[ # # ][ # # ]
[ # # ][ - + ]
271 : : {
272 [ # # ]: 0 : uno::Reference< drawing::XShape > xShape( m_xShapeFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
273 [ # # ][ # # ]: 0 : "com.sun.star.drawing.RectangleShape" ) ) ), uno::UNO_QUERY );
[ # # ]
274 [ # # ][ # # ]: 0 : xLossGainTarget->add(xShape);
275 : :
276 [ # # ][ # # ]: 0 : xShape->setPosition( Position3DToAWTPoint( aPosLeftFirst ) );
[ # # ]
277 [ # # ]: 0 : drawing::Direction3D aDiff = aPosRightLast-aPosLeftFirst;
278 [ # # ]: 0 : awt::Size aAWTSize( Direction3DToAWTSize( aDiff ));
279 : : // workaround for bug in drawing: if height is 0 the box gets infinitely large
280 [ # # ]: 0 : if( aAWTSize.Height == 0 )
281 : 0 : aAWTSize.Height = 1;
282 [ # # ][ # # ]: 0 : xShape->setSize( aAWTSize );
283 : :
284 [ # # ]: 0 : uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY );
285 [ # # ]: 0 : if(xProp.is())
286 : : {
287 [ # # ]: 0 : if(bBlack)
288 [ # # ]: 0 : PropertyMapper::setMultiProperties( aBlackBox_Names, aBlackBox_Values, xProp );
289 : : else
290 [ # # ]: 0 : PropertyMapper::setMultiProperties( aWhiteBox_Names, aWhiteBox_Values, xProp );
291 : 0 : }
292 : : }
293 : : else
294 : : {
295 [ + - ]: 60 : drawing::PolyPolygonShape3D aPoly;
296 : :
297 : 60 : sal_Int32 nLineIndex = 0;
298 [ - + ][ # # ]: 60 : if( bShowFirst && pPosHelper->isLogicVisible( fUnscaledX, fUnscaledY_First ,fLogicZ )
[ # # ][ # # ]
[ # # ][ - + ]
299 [ # # ][ # # ]: 0 : && isValidPosition(aPosLeftFirst) && isValidPosition(aPosMiddleFirst) )
300 : : {
301 [ # # ]: 0 : AddPointToPoly( aPoly, aPosLeftFirst, nLineIndex );
302 [ # # ]: 0 : AddPointToPoly( aPoly, aPosMiddleFirst, nLineIndex++ );
303 : : }
304 [ + - ][ + + ]: 156 : if( pPosHelper->isLogicVisible( fUnscaledX, fUnscaledY_Last ,fLogicZ )
[ + - ][ + - ]
[ + + ]
305 [ + - ][ + - ]: 96 : && isValidPosition(aPosMiddleLast) && isValidPosition(aPosRightLast) )
306 : : {
307 [ + - ]: 48 : AddPointToPoly( aPoly, aPosMiddleLast, nLineIndex );
308 [ + - ]: 48 : AddPointToPoly( aPoly, aPosRightLast, nLineIndex );
309 : : }
310 : :
311 [ + + ]: 60 : if( aPoly.SequenceX.getLength() )
312 : : {
313 [ + - ]: 48 : uno::Reference< drawing::XShape > xShape( m_xShapeFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
314 [ + - ][ + - ]: 48 : "com.sun.star.drawing.PolyLineShape" ) ) ), uno::UNO_QUERY );
[ + - ]
315 [ + - ][ + - ]: 48 : xPointGroupShape_Shapes->add(xShape);
316 [ + - ]: 48 : uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY );
317 [ + - ]: 48 : if(xProp.is())
318 : : {
319 [ + - ][ + - ]: 48 : xProp->setPropertyValue( C2U( UNO_NAME_POLYPOLYGON ), uno::makeAny( PolyToPointSequence(aPoly) ) );
[ + - ][ + - ]
[ + - ][ + - ]
320 [ + - ][ + - ]: 48 : this->setMappedProperties( xShape, xPointProp, PropertyMapper::getPropertyNameMapForLineSeriesProperties() );
321 : 48 : }
322 [ + - ]: 60 : }
323 : : }
324 : :
325 : : //create data point label
326 [ + - ][ - + ]: 60 : if( (**aSeriesIter).getDataPointLabelIfLabel(nIndex) )
327 : : {
328 [ # # ][ # # ]: 0 : if(isValidPosition(aPosMiddleFirst))
329 : 0 : this->createDataLabel( xTextTarget, **aSeriesIter, nIndex
330 [ # # # # ]: 0 : , fUnscaledY_First, 1.0, Position3DToAWTPoint(aPosMiddleFirst), LABEL_ALIGN_LEFT_BOTTOM );
331 [ # # ][ # # ]: 0 : if(isValidPosition(aPosMiddleLast))
332 : 0 : this->createDataLabel( xTextTarget, **aSeriesIter, nIndex
333 [ # # # # ]: 0 : , fUnscaledY_Last, 1.0, Position3DToAWTPoint(aPosMiddleLast), LABEL_ALIGN_RIGHT_TOP );
334 [ # # ][ # # ]: 0 : if(isValidPosition(aPosMiddleMinimum))
335 : 0 : this->createDataLabel( xTextTarget, **aSeriesIter, nIndex
336 [ # # # # ]: 0 : , fUnscaledY_Min, 1.0, Position3DToAWTPoint(aPosMiddleMinimum), LABEL_ALIGN_BOTTOM );
337 [ # # ][ # # ]: 0 : if(isValidPosition(aPosMiddleMaximum))
338 : 0 : this->createDataLabel( xTextTarget, **aSeriesIter, nIndex
339 [ # # # # ]: 0 : , fUnscaledY_Max, 1.0, Position3DToAWTPoint(aPosMiddleMaximum), LABEL_ALIGN_TOP );
340 : : }
341 : 60 : }//next series in x slot (next y slot)
342 : : }//next x slot
343 : : }//next z slot
344 [ + - ][ + - ]: 4 : }//next category
[ + - ][ + - ]
345 : : //=============================================================================
346 : : //=============================================================================
347 : : //=============================================================================
348 : : /* @todo remove series shapes if empty
349 : : //remove and delete point-group-shape if empty
350 : : if(!xSeriesGroupShape_Shapes->getCount())
351 : : {
352 : : (*aSeriesIter)->m_xShape.set(NULL);
353 : : m_xLogicTarget->remove(xSeriesGroupShape_Shape);
354 : : }
355 : : */
356 : :
357 : : //remove and delete series-group-shape if empty
358 : :
359 : : //... todo
360 : : }
361 : :
362 : : //.............................................................................
363 : : } //namespace chart
364 : : //.............................................................................
365 : :
366 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|