33#include <unonames.hxx>
35#include <com/sun/star/chart2/Symbol.hpp>
36#include <com/sun/star/chart/DataLabelPlacement.hpp>
37#include <com/sun/star/chart/MissingValueTreatment.hpp>
41#include <osl/diagnose.h>
43#include <com/sun/star/beans/XPropertySet.hpp>
44#include <officecfg/Office/Compatibility.hxx>
45#include <officecfg/Office/Chart.hxx>
55 , sal_Int32 nDimensionCount
59 : VSeriesPlotter( xChartTypeModel, nDimensionCount, bCategoryXAxis )
60 , m_pMainPosHelper(new PlottingPositionHelper())
63 , m_bSymbol( ChartTypeHelper::isSupportingSymbolProperties(xChartTypeModel,nDimensionCount) )
64 , m_eCurveStyle(CurveStyle_LINES)
65 , m_nCurveResolution(20)
68 m_pMainPosHelper->AllowShiftXAxisPos(
true);
69 m_pMainPosHelper->AllowShiftZAxisPos(
true);
71 PlotterBase::m_pPosHelper = m_pMainPosHelper.get();
72 VSeriesPlotter::m_pMainPosHelper = m_pMainPosHelper.get();
76 if( m_xChartTypeModel.is() )
83 catch( uno::Exception& e )
91AreaChart::~AreaChart()
95bool AreaChart::isSeparateStackingForDifferentSigns( sal_Int32 )
103 if( m_bArea || m_nDimension == 3 )
104 return LegendSymbolStyle::Box;
105 return LegendSymbolStyle::Line;
113 if( pSymbolProperties )
115 aRet <<= *pSymbolProperties;
121drawing::Direction3D AreaChart::getPreferredDiagramAspectRatio()
const
123 drawing::Direction3D aRet(1,-1,1);
124 if( m_nDimension == 2 )
125 aRet = drawing::Direction3D(-1,-1,-1);
126 else if (m_pPosHelper)
128 drawing::Direction3D aScale( m_pPosHelper->getScaledLogicWidth() );
129 aRet.DirectionZ = aScale.DirectionZ*0.2;
130 if(aRet.DirectionZ>1.0)
132 if(aRet.DirectionZ>10)
138void AreaChart::addSeries( std::unique_ptr<VDataSeries> pSeries, sal_Int32 zSlot, sal_Int32 xSlot, sal_Int32 ySlot )
140 if( m_bArea && pSeries )
142 sal_Int32 nMissingValueTreatment = pSeries->getMissingValueTreatment();
143 if( nMissingValueTreatment == css::chart::MissingValueTreatment::LEAVE_GAP )
144 pSeries->setMissingValueTreatment( css::chart::MissingValueTreatment::USE_ZERO );
146 if( m_nDimension == 3 && !m_bCategoryXAxis )
149 OSL_ENSURE( zSlot==-1,
"3D xy charts should be deep stacked in model also" );
154 VSeriesPlotter::addSeries( std::move(pSeries), zSlot, xSlot, ySlot );
159 sal_Int32 nPolyCount = rPolyPoly.size();
164 std::vector<std::vector<css::drawing::Position3D>> aTmp;
165 aTmp.resize(nPolyCount);
167 for( sal_Int32 nPolygonIndex = 0; nPolygonIndex<nPolyCount; nPolygonIndex++ )
169 std::vector<css::drawing::Position3D>* pOuterSource = &rPolyPoly[nPolygonIndex];
170 std::vector<css::drawing::Position3D>* pOuterTarget = &aTmp[nPolygonIndex];
172 sal_Int32 nPointCount = pOuterSource->size();
176 pOuterTarget->resize(nPointCount);
178 css::drawing::Position3D* pSource = pOuterSource->data();
179 css::drawing::Position3D* pTarget = pOuterTarget->data();
183 sal_Int32 nTargetPointCount=1;
185 for( sal_Int32 nSource=1; nSource<nPointCount; nSource++ )
188 , pSource->PositionX, pSource->PositionY, pSource->PositionZ ) )
198 if( nTargetPointCount<nPointCount )
200 pOuterTarget->resize(nTargetPointCount);
203 pOuterSource->clear();
207 rPolyPoly.resize(nPolyCount);
209 rPolyPoly = std::move(aTmp);
212bool AreaChart::create_stepped_line(
213 std::vector<std::vector<css::drawing::Position3D>> aStartPoly,
214 chart2::CurveStyle eCurveStyle,
216 std::vector<std::vector<css::drawing::Position3D>> &aPoly )
218 sal_uInt32 nOuterCount = aStartPoly.size();
222 std::vector<std::vector<css::drawing::Position3D>> aSteppedPoly;
223 aSteppedPoly.resize(nOuterCount);
225 auto pSequence = aSteppedPoly.data();
227 for( sal_uInt32 nOuter = 0; nOuter < nOuterCount; ++nOuter )
229 if( aStartPoly[nOuter].
size() <= 1 )
232 sal_uInt32 nMaxIndexPoints = aStartPoly[nOuter].size()-1;
233 sal_uInt32 nNewIndexPoints = 0;
234 if ( eCurveStyle==CurveStyle_STEP_START || eCurveStyle==CurveStyle_STEP_END)
235 nNewIndexPoints = nMaxIndexPoints * 2 + 1;
237 nNewIndexPoints = nMaxIndexPoints * 3 + 1;
239 const css::drawing::Position3D* pOld = aStartPoly[nOuter].data();
241 pSequence[nOuter].resize( nNewIndexPoints );
243 css::drawing::Position3D* pNew = pSequence[nOuter].data();
246 for( sal_uInt32 oi = 0; oi < nMaxIndexPoints; oi++ )
248 switch ( eCurveStyle )
250 case CurveStyle_STEP_START:
258 pNew[1+oi*2].PositionX = pOld[oi+1].PositionX;
259 pNew[1+oi*2].PositionY = pOld[oi].PositionY;
260 pNew[1+oi*2].PositionZ = pOld[oi].PositionZ;
262 pNew[1+oi*2+1] = pOld[oi+1];
264 case CurveStyle_STEP_END:
272 pNew[1+oi*2].PositionX = pOld[oi].PositionX;
273 pNew[1+oi*2].PositionY = pOld[oi+1].PositionY;
274 pNew[1+oi*2].PositionZ = pOld[oi].PositionZ;
276 pNew[1+oi*2+1] = pOld[oi+1];
278 case CurveStyle_STEP_CENTER_X:
286 pNew[1+oi*3].PositionX = (pOld[oi].PositionX + pOld[oi+1].PositionX) / 2;
287 pNew[1+oi*3].PositionY = pOld[oi].PositionY;
288 pNew[1+oi*3].PositionZ = pOld[oi].PositionZ;
290 pNew[1+oi*3+1].PositionX = (pOld[oi].PositionX + pOld[oi+1].PositionX) / 2;
291 pNew[1+oi*3+1].PositionY = pOld[oi+1].PositionY;
292 pNew[1+oi*3+1].PositionZ = pOld[oi].PositionZ;
294 pNew[1+oi*3+2] = pOld[oi+1];
296 case CurveStyle_STEP_CENTER_Y:
304 pNew[1+oi*3].PositionX = pOld[oi].PositionX;
305 pNew[1+oi*3].PositionY = (pOld[oi].PositionY + pOld[oi+1].PositionY) / 2;
306 pNew[1+oi*3].PositionZ = pOld[oi].PositionZ;
308 pNew[1+oi*3+1].PositionX = pOld[oi+1].PositionX;
309 pNew[1+oi*3+1].PositionY = (pOld[oi].PositionY + pOld[oi+1].PositionY) / 2;
310 pNew[1+oi*3+1].PositionZ = pOld[oi].PositionZ;
312 pNew[1+oi*3+2] = pOld[oi+1];
316 OSL_FAIL(
"Unknown curvestyle in AreaChart::create_stepped_line");
326 , std::vector<std::vector<css::drawing::Position3D>>
const * pSeriesPoly
332 std::vector<std::vector<css::drawing::Position3D>> aPoly;
333 if(m_eCurveStyle==CurveStyle_CUBIC_SPLINES)
335 std::vector<std::vector<css::drawing::Position3D>> aSplinePoly;
336 SplineCalculater::CalculateCubicSplines( *pSeriesPoly, aSplinePoly, m_nCurveResolution );
340 else if(m_eCurveStyle==CurveStyle_B_SPLINES)
342 std::vector<std::vector<css::drawing::Position3D>> aSplinePoly;
343 SplineCalculater::CalculateBSplines( *pSeriesPoly, aSplinePoly, m_nCurveResolution, m_nSplineOrder );
347 else if (m_eCurveStyle==CurveStyle_STEP_START ||
348 m_eCurveStyle==CurveStyle_STEP_END ||
349 m_eCurveStyle==CurveStyle_STEP_CENTER_Y ||
350 m_eCurveStyle==CurveStyle_STEP_CENTER_X
353 if (!create_stepped_line(*pSeriesPoly, m_eCurveStyle, pPosHelper, aPoly))
360 SAL_WARN_IF(m_eCurveStyle != CurveStyle_LINES,
"chart2.areachart",
"Unknown curve style");
364 if(!ShapeFactory::hasPolygonAnyLines(aPoly))
374 double fDepth = getTransformedDepth();
375 sal_Int32 nPolyCount = aPoly.size();
376 for(sal_Int32 nPoly=0;nPoly<nPolyCount;nPoly++)
378 sal_Int32 nPointCount = aPoly[nPoly].size();
379 for(sal_Int32 nPoint=0;nPoint<nPointCount-1;nPoint++)
381 drawing::Position3D aPoint1, aPoint2;
382 aPoint1 = aPoly[nPoly][nPoint+1];
383 aPoint2 = aPoly[nPoly][nPoint];
385 ShapeFactory::createStripe(xSeriesGroupShape_Shapes
386 ,
Stripe( aPoint1, aPoint2, fDepth )
387 , pSeries->
getPropertiesOfSeries(), PropertyMapper::getPropertyNameMapForFilledSeriesProperties(),
true, 1 );
393 xShape = ShapeFactory::createLine2D( xSeriesGroupShape_Shapes, aPoly );
394 PropertyMapper::setMappedProperties( *xShape
396 , PropertyMapper::getPropertyNameMapForLineSeriesProperties() );
404 , std::vector<std::vector<css::drawing::Position3D>>
const * pSeriesPoly
405 , std::vector<std::vector<css::drawing::Position3D>>
const * pPreviousSeriesPoly
413 std::vector<std::vector<css::drawing::Position3D>> aPoly( *pSeriesPoly );
415 if(!pPreviousSeriesPoly)
420 if( m_nDimension==3 )
424 if(fMaxX<pPosHelper->getLogicMinX() || fMinX>pPosHelper->
getLogicMaxX())
442 ShapeFactory::closePolygon(aPoly);
446 std::vector<std::vector<css::drawing::Position3D>> aClippedPoly;
448 ShapeFactory::closePolygon(aClippedPoly);
449 aPoly = aClippedPoly;
452 if(!ShapeFactory::hasPolygonAnyLines(aPoly))
462 xShape = ShapeFactory::createArea3D( xSeriesGroupShape_Shapes
463 , aPoly, getTransformedDepth() );
467 xShape = ShapeFactory::createArea2D( xSeriesGroupShape_Shapes
470 PropertyMapper::setMappedProperties( *xShape
472 , PropertyMapper::getPropertyNameMapForFilledSeriesProperties() );
478void AreaChart::impl_createSeriesShapes()
483 for(
auto const& rZSlot : m_aZSlots )
485 for(
auto const& rXSlot : rZSlot )
487 std::map< sal_Int32, std::vector<std::vector<css::drawing::Position3D>>* > aPreviousSeriesPolyMap;
488 std::vector<std::vector<css::drawing::Position3D>>* pSeriesPoly =
nullptr;
491 for( std::unique_ptr<VDataSeries>
const & pSeries : rXSlot.m_aSeriesVector )
493 sal_Int32 nAttachedAxisIndex = pSeries->getAttachedAxisIndex();
495 m_pPosHelper = &rPosHelper;
497 createRegressionCurvesShapes( *pSeries, m_xErrorBarTarget, m_xRegressionCurveEquationTarget,
498 m_pPosHelper->maySkipPointsInRegressionCalculation());
500 pSeriesPoly = &pSeries->m_aPolyPolygonShape3D;
503 if (!impl_createArea(pSeries.get(), pSeriesPoly,
504 aPreviousSeriesPolyMap[nAttachedAxisIndex], &rPosHelper))
509 if (!impl_createLine(pSeries.get(), pSeriesPoly, &rPosHelper))
512 aPreviousSeriesPolyMap[nAttachedAxisIndex] = pSeriesPoly;
521void lcl_reorderSeries( std::vector< std::vector< VDataSeriesGroup > >& rZSlots )
523 std::vector< std::vector< VDataSeriesGroup > > aRet;
524 aRet.reserve( rZSlots.size() );
526 std::vector< std::vector< VDataSeriesGroup > >::reverse_iterator aZIt( rZSlots.rbegin() );
527 std::vector< std::vector< VDataSeriesGroup > >::reverse_iterator aZEnd( rZSlots.rend() );
528 for( ; aZIt != aZEnd; ++aZIt )
530 std::vector< VDataSeriesGroup > aXSlot;
531 aXSlot.reserve( aZIt->size() );
533 std::vector< VDataSeriesGroup >::reverse_iterator aXIt( aZIt->rbegin() );
534 std::vector< VDataSeriesGroup >::reverse_iterator aXEnd( aZIt->rend() );
535 for( ; aXIt != aXEnd; ++aXIt )
536 aXSlot.push_back(std::move(*aXIt));
538 aRet.push_back(std::move(aXSlot));
541 rZSlots = std::move(aRet);
547 FormerPoint(
double fX,
double fY,
double fZ )
551 :
m_fX(
std::numeric_limits<double>::quiet_NaN())
552 ,
m_fY(
std::numeric_limits<double>::quiet_NaN())
553 ,
m_fZ(
std::numeric_limits<double>::quiet_NaN())
564void AreaChart::createShapes()
566 if( m_aZSlots.empty() )
570 if( officecfg::Office::Compatibility::View::ReverseSeriesOrderAreaAndNetChart::get() && m_nDimension == 2 && ( m_bArea || !m_bCategoryXAxis ) )
571 lcl_reorderSeries( m_aZSlots );
573 OSL_ENSURE(m_xLogicTarget.is()&&m_xFinalTarget.is(),
"AreaChart is not proper initialized");
574 if(!(m_xLogicTarget.is()&&m_xFinalTarget.is()))
582 m_xSeriesTarget = createGroupShape( m_xLogicTarget );
584 m_xErrorBarTarget = createGroupShape( m_xLogicTarget );
586 m_xErrorBarTarget = m_xSeriesTarget;
587 m_xTextTarget = ShapeFactory::createGroup2D( m_xFinalTarget );
588 m_xRegressionCurveEquationTarget = ShapeFactory::createGroup2D( m_xFinalTarget );
593 double fLogicZ = 1.0;
595 sal_Int32 nStartIndex = 0;
596 sal_Int32 nEndIndex = VSeriesPlotter::getPointCount();
601 std::map< VDataSeries*, FormerPoint > aSeriesFormerPointMap;
602 m_bPointsWereSkipped =
false;
603 sal_Int32 nSkippedPoints = 0;
604 sal_Int32 nCreatedPoints = 0;
606 bool bDateCategory = (m_pExplicitCategoriesProvider && m_pExplicitCategoriesProvider->isDateAxis());
608 std::vector<std::map< sal_Int32, double > > aLogicYSumMapByX(nEndIndex);
609 for(
auto const& rZSlot : m_aZSlots )
612 for(
auto const& rXSlot : rZSlot )
614 for( std::unique_ptr<VDataSeries>
const & pSeries : rXSlot.m_aSeriesVector )
620 pSeries->doSortByXValues();
624 std::map< sal_Int32, double >& rLogicYSumMap = aLogicYSumMapByX[
nIndex];
625 sal_Int32 nAttachedAxisIndex = pSeries->getAttachedAxisIndex();
626 rLogicYSumMap.insert({nAttachedAxisIndex, 0.0});
628 m_pPosHelper = &getPlottingPositionHelper(nAttachedAxisIndex);
630 double fAdd = pSeries->getYValue(
nIndex );
631 if( !std::isnan(fAdd) && !std::isinf(fAdd) )
632 rLogicYSumMap[nAttachedAxisIndex] += fabs( fAdd );
638 const bool bUseErrorRectangle = officecfg::Office::Chart::ErrorProperties::ErrorRectangle::get();
641 for(
auto const& rZSlot : m_aZSlots )
645 for(
auto const& rXSlot : rZSlot )
647 std::vector<std::map< sal_Int32, double > > aLogicYForNextSeriesMapByX(nEndIndex);
649 for( std::unique_ptr<VDataSeries>
const & pSeries : rXSlot.m_aSeriesVector )
656 sal_Int32 nAttachedAxisIndex = pSeries->getAttachedAxisIndex();
658 pSeries->getMinMaxXValue(fXMin, fXMax);
660 m_pPosHelper = &rPosHelper;
664 pSeries->m_fLogicZPos = fLogicZ;
672 if( m_bArea && (rXSlot.m_aSeriesVector.size() == 1) && (
nIndex >= pSeries->getTotalPointCount()) )
676 double fLogicX = pSeries->getXValue(
nIndex);
679 if (std::isnan(fLogicX) || (fLogicX < fXMin || fLogicX > fXMax))
682 fLogicX = DateHelper::RasterizeDateValue( fLogicX, m_aNullDate, m_nTimeResolution );
684 double fLogicY = pSeries->getYValue(
nIndex);
686 if( m_nDimension==3 && m_bArea && rXSlot.m_aSeriesVector.size()!=1 )
687 fLogicY = fabs( fLogicY );
689 double fLogicValueForLabeDisplay = fLogicY;
690 std::map< sal_Int32, double >& rLogicYSumMap = aLogicYSumMapByX[
nIndex];
691 if (rPosHelper.
isPercentY() && rLogicYSumMap[nAttachedAxisIndex] != 0.0)
693 fLogicY = fabs( fLogicY )/rLogicYSumMap[nAttachedAxisIndex];
696 if( std::isnan(fLogicX) || std::isinf(fLogicX)
697 || std::isnan(fLogicY) || std::isinf(fLogicY)
698 || std::isnan(fLogicZ) || std::isinf(fLogicZ) )
700 if( pSeries->getMissingValueTreatment() == css::chart::MissingValueTreatment::LEAVE_GAP )
702 std::vector<std::vector<css::drawing::Position3D>>& rPolygon = pSeries->m_aPolyPolygonShape3D;
703 sal_Int32& rIndex = pSeries->m_nPolygonIndex;
706 if( !rPolygon[ rIndex ].empty() )
713 std::map< sal_Int32, double >& rLogicYForNextSeriesMap = aLogicYForNextSeriesMapByX[
nIndex];
714 rLogicYForNextSeriesMap.try_emplace(nAttachedAxisIndex, 0.0);
716 double fPreviousYValue = rLogicYForNextSeriesMap[nAttachedAxisIndex];
717 fLogicY += rLogicYForNextSeriesMap[nAttachedAxisIndex];
718 rLogicYForNextSeriesMap[nAttachedAxisIndex] = fLogicY;
720 bool bIsVisible = rPosHelper.
isLogicVisible(fLogicX, fLogicY, fLogicZ);
725 double& rfMinX = pSeries->m_fLogicMinX;
726 if(!
nIndex||fLogicX<rfMinX)
728 double& rfMaxX = pSeries->m_fLogicMaxX;
729 if(!
nIndex||fLogicX>rfMaxX)
733 drawing::Position3D aUnscaledLogicPosition( fLogicX, fLogicY, fLogicZ );
734 drawing::Position3D aScaledLogicPosition(aUnscaledLogicPosition);
738 drawing::Position3D aScenePosition(
742 FormerPoint aFormerPoint( aSeriesFormerPointMap[pSeries.get()] );
744 if (!pSeries->isAttributedDataPoint(
nIndex)
746 aFormerPoint.m_fX, aFormerPoint.m_fY, aFormerPoint.m_fZ,
747 aScaledLogicPosition.PositionX, aScaledLogicPosition.PositionY,
748 aScaledLogicPosition.PositionZ))
751 m_bPointsWereSkipped =
true;
754 aSeriesFormerPointMap[pSeries.get()] = FormerPoint(aScaledLogicPosition.PositionX, aScaledLogicPosition.PositionY, aScaledLogicPosition.PositionZ);
758 if( isValidPosition(aScaledLogicPosition) )
760 AddPointToPoly( pSeries->m_aPolyPolygonShape3D, aScaledLogicPosition, pSeries->m_nPolygonIndex );
768 bool bCreateYErrorBar =
false, bCreateXErrorBar =
false;
771 if( xErrorBarProp.is() )
773 bool bShowPositive =
false;
774 bool bShowNegative =
false;
775 xErrorBarProp->getPropertyValue(
"ShowPositiveError") >>= bShowPositive;
776 xErrorBarProp->getPropertyValue(
"ShowNegativeError") >>= bShowNegative;
777 bCreateYErrorBar = bShowPositive || bShowNegative;
780 xErrorBarProp = pSeries->getXErrorBarProperties(
nIndex);
781 if ( xErrorBarProp.is() )
783 bool bShowPositive =
false;
784 bool bShowNegative =
false;
785 xErrorBarProp->getPropertyValue(
"ShowPositiveError") >>= bShowPositive;
786 xErrorBarProp->getPropertyValue(
"ShowNegativeError") >>= bShowNegative;
787 bCreateXErrorBar = bShowPositive || bShowNegative;
791 Symbol* pSymbolProperties = m_bSymbol ? pSeries->getSymbolProperties(
nIndex ) :
nullptr;
792 bool bCreateSymbol = pSymbolProperties && (pSymbolProperties->Style != SymbolStyle_NONE);
794 if( !bCreateSymbol && !bCreateYErrorBar &&
795 !bCreateXErrorBar && !pSeries->getDataPointLabelIfLabel(
nIndex) )
802 drawing::Direction3D aSymbolSize(0,0,0);
808 OUString aPointCID = ObjectIdentifier::createPointCID(
809 pSeries->getPointCID_Stub(),
nIndex );
811 if (pSymbolProperties->Style == SymbolStyle_STANDARD || pSymbolProperties->Style == SymbolStyle_GRAPHIC)
812 xPointGroupShape_Shapes = createGroupShape(xSeriesGroupShape_Shapes,aPointCID);
814 if (pSymbolProperties->Style != SymbolStyle_NONE)
816 aSymbolSize.DirectionX = pSymbolProperties->Size.Width;
817 aSymbolSize.DirectionY = pSymbolProperties->Size.Height;
820 if (pSymbolProperties->Style == SymbolStyle_STANDARD)
822 sal_Int32 nSymbol = pSymbolProperties->StandardSymbol;
823 ShapeFactory::createSymbol2D(
824 xPointGroupShape_Shapes, aScenePosition, aSymbolSize,
825 nSymbol, pSymbolProperties->BorderColor,
826 pSymbolProperties->FillColor);
828 else if (pSymbolProperties->Style == SymbolStyle_GRAPHIC)
830 ShapeFactory::createGraphic2D(xPointGroupShape_Shapes,
831 aScenePosition, aSymbolSize,
832 pSymbolProperties->Graphic);
838 if ( bUseErrorRectangle )
840 if ( bCreateXErrorBar || bCreateYErrorBar )
842 createErrorRectangle(
843 aUnscaledLogicPosition,
853 if (bCreateXErrorBar)
854 createErrorBar_X( aUnscaledLogicPosition, *pSeries,
nIndex, m_xErrorBarTarget );
856 if (bCreateYErrorBar)
857 createErrorBar_Y( aUnscaledLogicPosition, *pSeries,
nIndex, m_xErrorBarTarget,
nullptr );
861 if( pSeries->getDataPointLabelIfLabel(
nIndex) )
864 sal_Int32 nLabelPlacement = pSeries->getLabelPlacement(
867 if (m_bArea && nLabelPlacement == css::chart::DataLabelPlacement::CENTER)
870 fLogicY -= (fLogicY - fPreviousYValue) / 2.0;
876 drawing::Position3D aScenePosition3D( aScenePosition.PositionX
877 , aScenePosition.PositionY
878 , aScenePosition.PositionZ+getTransformedDepth() );
880 switch(nLabelPlacement)
882 case css::chart::DataLabelPlacement::TOP:
883 aScenePosition3D.PositionY -= (aSymbolSize.DirectionY/2+1);
886 case css::chart::DataLabelPlacement::BOTTOM:
887 aScenePosition3D.PositionY += (aSymbolSize.DirectionY/2+1);
890 case css::chart::DataLabelPlacement::LEFT:
891 aScenePosition3D.PositionX -= (aSymbolSize.DirectionX/2+1);
894 case css::chart::DataLabelPlacement::RIGHT:
895 aScenePosition3D.PositionX += (aSymbolSize.DirectionX/2+1);
898 case css::chart::DataLabelPlacement::CENTER:
902 OSL_FAIL(
"this label alignment is not implemented yet");
903 aScenePosition3D.PositionY -= (aSymbolSize.DirectionY/2+1);
908 awt::Point aScreenPosition2D;
909 sal_Int32 nOffset = 100;
917 createDataLabel( m_xTextTarget, *pSeries,
nIndex
918 , fLogicValueForLabeDisplay
919 , rLogicYSumMap[nAttachedAxisIndex], aScreenPosition2D, eAlignment, nOffset );
929 impl_createSeriesShapes();
946 "skipped points: " << nSkippedPoints <<
" created points: "
css::awt::Point transformSceneToScreenPosition(const css::drawing::Position3D &rScenePosition3D) const
double getBaseValueY() const
double getLogicMaxX() const
bool isSameForGivenResolution(double fX, double fY, double fZ, double fX2, double fY2, double fZ2)
double getLogicMinY() const
void setCoordinateSystemResolution(const css::uno::Sequence< sal_Int32 > &rCoordinateSystemResolution)
::basegfx::B2DRectangle getScaledLogicClipDoubleRect() const
bool isLogicVisible(double fX, double fY, double fZ) const
virtual css::drawing::Position3D transformLogicToScene(double fX, double fY, double fZ, bool bClip) const
void doLogicScaling(double *pX, double *pY, double *pZ) const
virtual css::drawing::Position3D transformScaledLogicToScene(double fX, double fY, double fZ, bool bClip) const
void clipLogicValues(double *pX, double *pY, double *pZ) const
static void setShapeName(const rtl::Reference< SvxShape > &xShape, const OUString &rName)
A Stripe represents a 2 dimensional foursquare plane in a 3 dimensional room.
css::chart2::Symbol * getSymbolProperties(sal_Int32 index) const
const css::uno::Reference< css::beans::XPropertySet > & getPropertiesOfSeries() const
#define SAL_WARN_IF(condition, area, stream)
#define SAL_INFO(area, stream)
OOO_DLLPUBLIC_CHARTTOOLS void AddPointToPoly(css::drawing::PolyPolygonShape3D &rPoly, const css::drawing::Position3D &rPos, sal_Int32 nSequenceIndex=0)
PolyPolygonShape3D + drawing::Position3D -> PolyPolygonShape3D.
OOO_DLLPUBLIC_CHARTTOOLS void appendPoly(std::vector< std::vector< css::drawing::Position3D > > &rRet, const std::vector< std::vector< css::drawing::Position3D > > &rAdd)
PolyPolygonShape3D + PolyPolygonShape3D -> PolyPolygonShape3D.
static void lcl_removeDuplicatePoints(std::vector< std::vector< css::drawing::Position3D > > &rPolyPoly, PlottingPositionHelper &rPosHelper)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
constexpr OUStringLiteral CHART_UNONAME_SPLINE_ORDER
constexpr OUStringLiteral CHART_UNONAME_CURVE_STYLE
constexpr OUStringLiteral CHART_UNONAME_CURVE_RESOLUTION