62#include <unonames.hxx>
65#include <com/sun/star/chart2/DataPointLabel.hpp>
66#include <com/sun/star/chart/ErrorBarStyle.hpp>
67#include <com/sun/star/chart/TimeUnit.hpp>
68#include <com/sun/star/chart2/MovingAverageType.hpp>
69#include <com/sun/star/chart2/XDataPointCustomLabelField.hpp>
70#include <com/sun/star/container/XChild.hpp>
71#include <com/sun/star/chart2/RelativePosition.hpp>
75#include <rtl/ustrbuf.hxx>
76#include <rtl/math.hxx>
78#include <com/sun/star/drawing/LineStyle.hpp>
79#include <com/sun/star/util/XCloneable.hpp>
91#include <unordered_map>
100using ::com::sun::star::uno::Reference;
101using ::com::sun::star::uno::Sequence;
104 : m_bValuesDirty(true)
119 : m_aSeriesVector( std::move(other.m_aSeriesVector) )
120 , m_bMaxPointCountDirty( other.m_bMaxPointCountDirty )
121 , m_nMaxPointCount( other.m_nMaxPointCount )
122 , m_aListOfCachedYValues( std::move(other.m_aListOfCachedYValues) )
148 , sal_Int32 nDimensionCount,
bool bCategoryXAxis )
150 , m_pMainPosHelper( nullptr )
151 , m_xChartTypeModel(
std::move(xChartTypeModel))
152 , m_bCategoryXAxis(bCategoryXAxis)
153 , m_nTimeResolution(css::
chart::TimeUnit::
DAY)
154 , m_aNullDate(30,12,1899)
155 , m_pExplicitCategoriesProvider(nullptr)
156 , m_bPointsWereSkipped(false)
157 , m_bPieLabelsAllowToMove(false)
158 , m_aAvailableOuterRect(0, 0, 0, 0)
160 SAL_WARN_IF(!m_xChartTypeModel.is(),
"chart2",
"no XChartType available in view, fallback to default values may be wrong");
166 for (std::vector<VDataSeriesGroup> & rGroupVector :
m_aZSlots)
170 rGroup.deleteSeries();
172 rGroupVector.clear();
185 OSL_PRECOND( pSeries,
"series to add is NULL" );
194 pSeries->setCategoryXAxis();
205 std::vector< VDataSeriesGroup > aZSlot;
206 aZSlot.emplace_back( std::move(pSeries) );
207 m_aZSlots.push_back( std::move(aZSlot) );
212 std::vector< VDataSeriesGroup >& rXSlots =
m_aZSlots[zSlot];
217 rXSlots.emplace_back( std::move(pSeries) );
231 OSL_FAIL(
"Not implemented yet");
233 else if( ySlot == -1 || ySlot >= nYSlotCount)
244 OSL_FAIL(
"Not implemented yet");
252 drawing::Direction3D aRet(1.0,1.0,1.0);
257 aRet.DirectionZ = aScale.DirectionZ*0.2;
258 if(aRet.DirectionZ>1.0)
260 if(aRet.DirectionZ>10)
267 for (std::vector<VDataSeriesGroup>
const & rGroupVector :
m_aZSlots)
272 for (std::unique_ptr<VDataSeries>
const & pSeries : rGroup.m_aSeriesVector)
274 pSeries->releaseShapes();
346 , sal_Int32 nPointIndex
348 ,
bool bAsPercentage )
354 sal_Int32 nNumberFormatKey = 0;
357 else if( bAsPercentage )
360 if( nPercentFormat != -1 )
361 nNumberFormatKey = nPercentFormat;
367 if(nNumberFormatKey<0)
373 nNumberFormatKey, fValue, nLabelCol, bColChanged );
380 assert(aNumDecimalSep.getLength() > 0);
382 aNumber = ::rtl::math::doubleToUString( fValue, rtl_math_StringFormat_G
383 , 3 , cDecSeparator );
390 , sal_Int32 nPointIndex
393 ,
const awt::Point& rScreenPosition2D
396 , sal_Int32 nTextWidth )
405 if( xPropertySet.is() )
410 aAny >>= aCustomLabels;
414 awt::Point aScreenPosition2D(rScreenPosition2D);
416 aScreenPosition2D.X -= nOffset;
418 aScreenPosition2D.X += nOffset;
420 aScreenPosition2D.Y -= nOffset;
422 aScreenPosition2D.Y += nOffset;
442 float fViewFontSize( 10.0 );
446 xProps->getPropertyValue(
"CharHeight") >>= fViewFontSize;
453 if(pLabel->ShowLegendSymbol)
455 sal_Int32 nSymbolHeight =
static_cast< sal_Int32
>( fViewFontSize * 0.6 );
457 sal_Int32 nSymbolWidth = aCurrentRatio.Width;
458 if( aCurrentRatio.Height > 0 )
460 nSymbolWidth = nSymbolHeight* aCurrentRatio.Width/aCurrentRatio.Height;
462 awt::Size aMaxSymbolExtent( nSymbolWidth, nSymbolHeight );
471 bool bTextWrap =
false;
472 OUString aSeparator(
" ");
473 double fRotationDegrees = 0.0;
479 xPointProps->getPropertyValue(
"TextWordWrap" ) >>= bTextWrap;
480 xPointProps->getPropertyValue(
"LabelSeparator" ) >>= aSeparator;
483 xPointProps->getPropertyValue(
"TextRotation" ) >>= fRotationDegrees;
486 catch(
const uno::Exception& )
491 sal_Int32 nLineCountForSymbolsize = 0;
492 sal_uInt32 nTextListLength = 4;
493 sal_uInt32 nCustomLabelsCount = aCustomLabels.getLength();
496 bool bUseCustomLabel = nCustomLabelsCount > 0;
497 if( bUseCustomLabel )
499 nTextListLength = ( nCustomLabelsCount > 3 ) ? nCustomLabelsCount : 3;
502 auto pTextList = aTextList.getArray();
503 for( sal_uInt32
i = 0;
i < nCustomLabelsCount; ++
i )
507 case DataPointCustomLabelFieldType_VALUE:
512 case DataPointCustomLabelFieldType_CATEGORYNAME:
517 case DataPointCustomLabelFieldType_SERIESNAME:
523 pTextList[
i] = xSeries->getLabelForRole( aRole );
526 case DataPointCustomLabelFieldType_PERCENTAGE:
537 case DataPointCustomLabelFieldType_CELLRANGE:
539 if (aCustomLabels[
i]->getDataLabelsRange())
540 pTextList[
i] = aCustomLabels[
i]->getString();
542 pTextList[
i] = OUString();
545 case DataPointCustomLabelFieldType_CELLREF:
548 pTextList[
i] = OUString();
551 case DataPointCustomLabelFieldType_TEXT:
553 pTextList[
i] = aCustomLabels[
i]->getString();
556 case DataPointCustomLabelFieldType_NEWLINE:
564 aCustomLabels[
i]->setString( aTextList[
i] );
569 auto pTextList = aTextList.getArray();
570 if( pLabel->ShowCategoryName )
575 if( pLabel->ShowSeriesName )
581 pTextList[1] = xSeries->getLabelForRole( aRole );
584 if( pLabel->ShowNumber )
589 if( pLabel->ShowNumberInPercent )
601 for(
auto const &
line : std::as_const(aTextList) )
603 if( !
line.isEmpty() )
605 ++nLineCountForSymbolsize;
622 bool bMultiLineLabel = ( aSeparator ==
"\n" );
624 if( bUseCustomLabel )
631 createText( xTarget_, aFormattedLabels, *pPropNames, *pPropValues,
637 OUStringBuffer aText;
638 for( sal_uInt32 nN = 0; nN < nTextListLength; ++nN)
640 if( !aTextList[nN].isEmpty() )
642 if( !aText.isEmpty() )
644 aText.append(aSeparator);
646 aText.append( aTextList[nN] );
652 createText( xTarget_, aText.makeStringAndClear(), *pPropNames, *pPropValues,
656 if( !xTextShape.is() )
660 if( nTextWidth == 0 && bTextWrap )
666 nTextWidth = nMinSize / 3;
671 if( nTextWidth != 0 && bTextWrap )
674 if( !bMultiLineLabel || nLineCountForSymbolsize <= 0 )
676 nLineCountForSymbolsize = 1;
678 awt::Size aTextSize = xTextShape->getSize();
679 sal_Int32 aTextLineHeight = aTextSize.Height / nLineCountForSymbolsize;
682 uno::Any aTextMaximumFrameWidth( nTextWidth );
683 xTextShape->SvxShape::setPropertyValue(
"TextMaximumFrameWidth", aTextMaximumFrameWidth );
686 aTextSize = xTextShape->getSize();
687 nLineCountForSymbolsize = aTextSize.Height / aTextLineHeight;
692 if( fRotationDegrees != 0.0 )
699 awt::Point aTextShapePos(xTextShape->getPosition());
702 awt::Point aRelPos = rDataSeries.
getLabelPosition(aTextShapePos, nPointIndex);
703 if( aRelPos.X != -1 )
705 xTextShape->setPosition(aRelPos);
710 sal_Int32 nX1 = rScreenPosition2D.X;
711 sal_Int32 nY1 = rScreenPosition2D.Y;
717 else if (nX1 > aRect.
getMaxX())
722 else if (nY1 > aRect.
getMaxY())
727 double fPageDiagonaleLength
729 if ((aLength.
getLength() / fPageDiagonaleLength) >= 0.01)
731 drawing::PointSequenceSequence aPoints{ { {nX1, nY1}, {nX2, nY2} } };
742 const awt::Point aUnrotatedTextPos(xTextShape->getPosition());
745 const awt::Point aOldTextPos( xTextShape->getPosition() );
746 awt::Point aNewTextPos( aOldTextPos );
748 awt::Point aSymbolPosition( aUnrotatedTextPos );
749 awt::Size aSymbolSize( xSymbol->getSize() );
750 awt::Size aTextSize = xTextShape->getSize();
752 sal_Int32 nXDiff = aSymbolSize.Width +
static_cast< sal_Int32
>( std::max( 100.0, fViewFontSize * 0.22 ) );
753 if( !bMultiLineLabel || nLineCountForSymbolsize <= 0 )
754 nLineCountForSymbolsize = 1;
755 aSymbolPosition.Y += ((aTextSize.Height/nLineCountForSymbolsize)/4);
761 aSymbolPosition.X -= nXDiff;
767 aNewTextPos.X += nXDiff;
773 aSymbolPosition.X -= nXDiff/2;
774 aNewTextPos.X += nXDiff/2;
777 xSymbol->setPosition( aSymbolPosition );
778 xTextShape->setPosition( aNewTextPos );
781 catch(
const uno::Exception& )
791double lcl_getErrorBarLogicLength(
794 sal_Int32 nErrorBarStyle,
799 double fResult = std::numeric_limits<double>::quiet_NaN();
802 switch( nErrorBarStyle )
804 case css::chart::ErrorBarStyle::NONE:
806 case css::chart::ErrorBarStyle::VARIANCE:
809 case css::chart::ErrorBarStyle::STANDARD_DEVIATION:
812 case css::chart::ErrorBarStyle::RELATIVE:
815 if( xProp->getPropertyValue( bPositive
816 ? OUString(
"PositiveError")
817 : OUString(
"NegativeError") ) >>= fPercent )
819 if( nIndex >=0 && nIndex < rData.getLength() &&
820 ! std::isnan( rData[nIndex] ) &&
821 ! std::isnan( fPercent ))
823 fResult = rData[
nIndex] * fPercent / 100.0;
828 case css::chart::ErrorBarStyle::ABSOLUTE:
829 xProp->getPropertyValue( bPositive
830 ? OUString(
"PositiveError")
831 : OUString(
"NegativeError") ) >>= fResult;
833 case css::chart::ErrorBarStyle::ERROR_MARGIN:
837 if( xProp->getPropertyValue( bPositive
838 ? OUString(
"PositiveError")
839 : OUString(
"NegativeError") ) >>= fPercent )
841 double fMaxValue = -std::numeric_limits<double>::infinity();
842 for(
double d : rData)
847 if( std::isfinite( fMaxValue ) &&
848 std::isfinite( fPercent ))
850 fResult = fMaxValue * fPercent / 100.0;
855 case css::chart::ErrorBarStyle::STANDARD_ERROR:
858 case css::chart::ErrorBarStyle::FROM_DATA:
860 uno::Reference< chart2::data::XDataSource > xErrorBarData( xProp, uno::UNO_QUERY );
861 if( xErrorBarData.is())
863 xErrorBarData, nIndex, bPositive, bYError);
868 catch(
const uno::Exception & )
876void lcl_AddErrorBottomLine(
const drawing::Position3D& rPosition,
::basegfx::B2DVector aMainDirection
877 , std::vector<std::vector<css::drawing::Position3D>>& rPoly, sal_Int32 nSequenceIndex )
879 double fFixedWidth = 200.0;
883 aOrthoDirection.normalize();
889 AddPointToPoly( rPoly, drawing::Position3D( aStart.
getX(), aStart.
getY(), rPosition.PositionZ), nSequenceIndex );
890 AddPointToPoly( rPoly, drawing::Position3D( aEnd.
getX(), aEnd.
getY(), rPosition.PositionZ), nSequenceIndex );
894 const drawing::Position3D& rStart
895 ,
const drawing::Position3D& rBottomEnd
896 , PlottingPositionHelper
const * pPosHelper
897 ,
const drawing::Position3D& rUnscaledLogicPosition
901 , rStart.PositionY - rBottomEnd.PositionY );
905 double MinX = pPosHelper->getLogicMinX();
906 double MinY = pPosHelper->getLogicMinY();
907 double MaxX = pPosHelper->getLogicMaxX();
908 double MaxY = pPosHelper->getLogicMaxY();
909 double fZ = pPosHelper->getLogicMinZ();
914 MinX = rUnscaledLogicPosition.PositionX;
915 MaxX = rUnscaledLogicPosition.PositionX;
920 MinY = rUnscaledLogicPosition.PositionY;
921 MaxY = rUnscaledLogicPosition.PositionY;
924 drawing::Position3D aStart = pPosHelper->transformLogicToScene( MinX, MinY, fZ,
false );
925 drawing::Position3D aEnd = pPosHelper->transformLogicToScene( MaxX, MaxY, fZ,
false );
928 , aStart.PositionY - aEnd.PositionY );
934 return aMainDirection;
937drawing::Position3D lcl_transformMixedToScene( PlottingPositionHelper
const * pPosHelper
938 ,
double fX ,
double fY ,
double fZ )
941 return drawing::Position3D(0,0,0);
942 pPosHelper->doLogicScaling(
nullptr,&fY,&fZ );
943 pPosHelper->clipScaledLogicValues( &fX,&fY,&fZ );
944 return pPosHelper->transformScaledLogicToScene( fX, fY, fZ,
false );
951 ,
const drawing::Position3D& rUnscaledLogicPosition
956 ,
const double* pfScaledLogicX
962 if( ! xErrorBarProperties.is())
967 bool bShowPositive =
false;
968 bool bShowNegative =
false;
969 sal_Int32 nErrorBarStyle = css::chart::ErrorBarStyle::VARIANCE;
971 xErrorBarProperties->getPropertyValue(
"ShowPositiveError") >>= bShowPositive;
972 xErrorBarProperties->getPropertyValue(
"ShowNegativeError") >>= bShowNegative;
973 xErrorBarProperties->getPropertyValue(
"ErrorBarStyle") >>= nErrorBarStyle;
975 if(!bShowPositive && !bShowNegative)
978 if(nErrorBarStyle==css::chart::ErrorBarStyle::NONE)
984 drawing::Position3D aUnscaledLogicPosition(rUnscaledLogicPosition);
985 if(nErrorBarStyle==css::chart::ErrorBarStyle::STANDARD_DEVIATION)
988 aUnscaledLogicPosition.PositionY = rVDataSeries.
getYMeanValue();
990 aUnscaledLogicPosition.PositionX = rVDataSeries.
getXMeanValue();
993 bool bCreateNegativeBorder =
false;
994 bool bCreatePositiveBorder =
false;
995 drawing::Position3D aMiddle(aUnscaledLogicPosition);
996 const double fX = aUnscaledLogicPosition.PositionX;
997 const double fY = aUnscaledLogicPosition.PositionY;
998 const double fZ = aUnscaledLogicPosition.PositionZ;
999 double fScaledX = fX;
1000 if( pfScaledLogicX )
1001 fScaledX = *pfScaledLogicX;
1005 aMiddle = lcl_transformMixedToScene(
m_pPosHelper, fScaledX, fY, fZ );
1007 drawing::Position3D aNegative(aMiddle);
1008 drawing::Position3D aPositive(aMiddle);
1014 double fLength = lcl_getErrorBarLogicLength(
aData, xErrorBarProperties, nErrorBarStyle,
nIndex,
true, bYError );
1015 if( std::isfinite( fLength ) )
1017 double fLocalX = fX;
1018 double fLocalY = fY;
1022 aPositive = lcl_transformMixedToScene(
m_pPosHelper, fScaledX, fLocalY, fZ );
1032 bShowPositive =
false;
1037 double fLength = lcl_getErrorBarLogicLength(
aData, xErrorBarProperties, nErrorBarStyle,
nIndex,
false, bYError );
1038 if( std::isfinite( fLength ) )
1040 double fLocalX = fX;
1041 double fLocalY = fY;
1045 aNegative = lcl_transformMixedToScene(
m_pPosHelper, fScaledX, fLocalY, fZ );
1052 if (std::isfinite(aNegative.PositionX) &&
1053 std::isfinite(aNegative.PositionY) &&
1054 std::isfinite(aNegative.PositionZ)) {
1065 bShowNegative =
false;
1069 bShowNegative =
false;
1072 if(!bShowPositive && !bShowNegative)
1075 std::vector<std::vector<css::drawing::Position3D>> aPoly;
1077 sal_Int32 nSequenceIndex=0;
1084 if( bShowNegative && bCreateNegativeBorder )
1088 lcl_AddErrorBottomLine( aNegative, aMainDirection, aPoly, nSequenceIndex );
1090 if( bShowPositive && bCreatePositiveBorder )
1094 lcl_AddErrorBottomLine( aPositive, aMainDirection, aPoly, nSequenceIndex );
1100 catch(
const uno::Exception & )
1108 const drawing::Position3D& rPos0
1109 ,
const drawing::Position3D& rPos1
1113 std::vector<std::vector<css::drawing::Position3D>> aPoly { { rPos0, rPos1} };
1121 const drawing::Position3D& rUnscaledLogicPosition
1125 ,
bool bUseXErrorData
1126 ,
bool bUseYErrorData )
1133 if ( bUseXErrorData )
1136 if ( !xErrorBorderPropX.is() )
1142 if ( bUseYErrorData )
1145 if ( !xErrorBorderPropY.is() )
1156 bool bShowXPositive =
false;
1157 bool bShowXNegative =
false;
1158 bool bShowYPositive =
false;
1159 bool bShowYNegative =
false;
1161 sal_Int32 nErrorBorderStyleX = css::chart::ErrorBarStyle::VARIANCE;
1162 sal_Int32 nErrorBorderStyleY = css::chart::ErrorBarStyle::VARIANCE;
1164 if ( bUseXErrorData )
1166 xErrorBorderPropX->getPropertyValue(
"ErrorBarStyle" ) >>= nErrorBorderStyleX;
1167 xErrorBorderPropX->getPropertyValue(
"ShowPositiveError") >>= bShowXPositive;
1168 xErrorBorderPropX->getPropertyValue(
"ShowNegativeError") >>= bShowXNegative;
1170 if ( bUseYErrorData )
1172 xErrorBorderPropY->getPropertyValue(
"ErrorBarStyle" ) >>= nErrorBorderStyleY;
1173 xErrorBorderPropY->getPropertyValue(
"ShowPositiveError") >>= bShowYPositive;
1174 xErrorBorderPropY->getPropertyValue(
"ShowNegativeError") >>= bShowYNegative;
1177 if ( bUseXErrorData && nErrorBorderStyleX == css::chart::ErrorBarStyle::NONE )
1178 bUseXErrorData =
false;
1179 if ( bUseYErrorData && nErrorBorderStyleY == css::chart::ErrorBarStyle::NONE )
1180 bUseYErrorData =
false;
1182 if ( !bShowXPositive && !bShowXNegative && !bShowYPositive && !bShowYNegative )
1188 drawing::Position3D aUnscaledLogicPosition( rUnscaledLogicPosition );
1189 if ( bUseXErrorData && nErrorBorderStyleX == css::chart::ErrorBarStyle::STANDARD_DEVIATION )
1190 aUnscaledLogicPosition.PositionX = rVDataSeries.
getXMeanValue();
1191 if ( bUseYErrorData && nErrorBorderStyleY == css::chart::ErrorBarStyle::STANDARD_DEVIATION )
1192 aUnscaledLogicPosition.PositionY = rVDataSeries.
getYMeanValue();
1194 const double fX = aUnscaledLogicPosition.PositionX;
1195 const double fY = aUnscaledLogicPosition.PositionY;
1196 const double fZ = aUnscaledLogicPosition.PositionZ;
1197 double fScaledX = fX;
1207 if ( bUseXErrorData )
1209 if ( bShowXPositive )
1210 fPosX = lcl_getErrorBarLogicLength( aDataX, xErrorBorderPropX,
1211 nErrorBorderStyleX,
nIndex,
true,
false );
1212 if ( bShowXNegative )
1213 fNegX = lcl_getErrorBarLogicLength( aDataX, xErrorBorderPropX,
1214 nErrorBorderStyleX,
nIndex,
false,
false );
1217 if ( bUseYErrorData )
1219 if ( bShowYPositive )
1220 fPosY = lcl_getErrorBarLogicLength( aDataY, xErrorBorderPropY,
1221 nErrorBorderStyleY,
nIndex,
true,
true );
1222 if ( bShowYNegative )
1223 fNegY = lcl_getErrorBarLogicLength( aDataY, xErrorBorderPropY,
1224 nErrorBorderStyleY,
nIndex,
false,
true );
1227 if ( !( std::isfinite( fPosX ) &&
1228 std::isfinite( fPosY ) &&
1229 std::isfinite( fNegX ) &&
1230 std::isfinite( fNegY ) ) )
1233 drawing::Position3D aBottomLeft( lcl_transformMixedToScene(
m_pPosHelper,
1234 fX - fNegX, fY - fNegY, fZ ) );
1235 drawing::Position3D aTopLeft( lcl_transformMixedToScene(
m_pPosHelper,
1236 fX - fNegX, fY + fPosY, fZ ) );
1237 drawing::Position3D aTopRight( lcl_transformMixedToScene(
m_pPosHelper,
1238 fX + fPosX, fY + fPosY, fZ ) );
1239 drawing::Position3D aBottomRight( lcl_transformMixedToScene(
m_pPosHelper,
1240 fX + fPosX, fY - fNegY, fZ ) );
1241 if ( bUseXErrorData )
1244 addErrorBorder( aTopLeft, aTopRight, xErrorBorder_ShapesX, xErrorBorderPropX );
1247 addErrorBorder( aBottomRight, aBottomLeft, xErrorBorder_ShapesX, xErrorBorderPropX );
1250 if ( bUseYErrorData )
1253 addErrorBorder( aBottomLeft, aTopLeft, xErrorBorder_ShapesY, xErrorBorderPropY );
1256 addErrorBorder( aTopRight, aBottomRight, xErrorBorder_ShapesY, xErrorBorderPropY );
1259 catch(
const uno::Exception & )
1266 ,
VDataSeries& rVDataSeries, sal_Int32 nPointIndex
1273 if( xErrorBarProp.is())
1279 , rUnscaledLogicPosition, xErrorBarProp
1280 , rVDataSeries, nPointIndex
1287 ,
VDataSeries& rVDataSeries, sal_Int32 nPointIndex
1289 ,
double const * pfScaledLogicX )
1295 if( xErrorBarProp.is())
1301 , rUnscaledLogicPosition, xErrorBarProp
1302 , rVDataSeries, nPointIndex
1311 bool bMaySkipPoints )
1316 if(!xContainer.is())
1322 const std::vector< rtl::Reference< ::chart::RegressionCurveModel > > & aCurveList = xContainer->getRegressionCurves2();
1324 for(std::size_t nN=0; nN<aCurveList.size(); nN++)
1326 const auto & rCurve = aCurveList[nN];
1328 if( !xCalculator.is())
1333 sal_Int32 aDegree = 2;
1334 sal_Int32 aPeriod = 2;
1335 sal_Int32 aMovingAverageType = css::chart2::MovingAverageType::Prior;
1336 double aExtrapolateForward = 0.0;
1337 double aExtrapolateBackward = 0.0;
1338 bool bForceIntercept =
false;
1339 double aInterceptValue = 0.0;
1341 if ( !bAverageLine )
1343 rCurve->getPropertyValue(
"PolynomialDegree") >>= aDegree;
1344 rCurve->getPropertyValue(
"MovingAveragePeriod") >>= aPeriod;
1345 rCurve->getPropertyValue(
"MovingAverageType") >>= aMovingAverageType;
1346 rCurve->getPropertyValue(
"ExtrapolateForward") >>= aExtrapolateForward;
1347 rCurve->getPropertyValue(
"ExtrapolateBackward") >>= aExtrapolateBackward;
1348 rCurve->getPropertyValue(
"ForceIntercept") >>= bForceIntercept;
1349 if (bForceIntercept)
1350 rCurve->getPropertyValue(
"InterceptValue") >>= aInterceptValue;
1356 double fMinX = fChartMinX;
1357 double fMaxX = fChartMaxX;
1359 double fPointScale = 1.0;
1364 fMaxX += aExtrapolateForward;
1365 fMinX -= aExtrapolateBackward;
1367 fPointScale = (fMaxX - fMinX) / (fChartMaxX - fChartMinX);
1369 fPointScale = std::min(fPointScale, 1000.0);
1372 xCalculator->setRegressionProperties(aDegree, bForceIntercept, aInterceptValue, aPeriod,
1373 aMovingAverageType);
1374 xCalculator->recalculateRegression(rVDataSeries.
getAllX(), rVDataSeries.
getAllY());
1375 sal_Int32 nPointCount = 100 * fPointScale;
1377 if ( nPointCount < 2 )
1383 if( aScales.size() >= 2 )
1385 xScalingX.set( aScales[0].Scaling );
1386 xScalingY.set( aScales[1].Scaling );
1390 xCalculator->getCurveValues(
1391 fMinX, fMaxX, nPointCount,
1392 xScalingX, xScalingY, bMaySkipPoints ));
1394 nPointCount = aCalculatedPoints.getLength();
1396 drawing::PolyPolygonShape3D aRegressionPoly;
1397 aRegressionPoly.SequenceX.realloc(1);
1398 aRegressionPoly.SequenceY.realloc(1);
1399 aRegressionPoly.SequenceZ.realloc(1);
1400 auto pSequenceX = aRegressionPoly.SequenceX.getArray();
1401 auto pSequenceY = aRegressionPoly.SequenceY.getArray();
1402 auto pSequenceZ = aRegressionPoly.SequenceZ.getArray();
1403 pSequenceX[0].realloc(nPointCount);
1404 pSequenceY[0].realloc(nPointCount);
1405 auto pSequenceX0 = pSequenceX[0].getArray();
1406 auto pSequenceY0 = pSequenceY[0].getArray();
1408 sal_Int32 nRealPointCount = 0;
1410 for(geometry::RealPoint2D
const &
p : aCalculatedPoints)
1412 double fLogicX =
p.X;
1413 double fLogicY =
p.Y;
1414 double fLogicZ = 0.0;
1420 if(!std::isnan(fLogicX) && !std::isinf(fLogicX) &&
1421 !std::isnan(fLogicY) && !std::isinf(fLogicY) &&
1422 !std::isnan(fLogicZ) && !std::isinf(fLogicZ) )
1424 pSequenceX0[nRealPointCount] = fLogicX;
1425 pSequenceY0[nRealPointCount] = fLogicY;
1429 pSequenceX[0].realloc(nRealPointCount);
1430 pSequenceY[0].realloc(nRealPointCount);
1431 pSequenceZ[0].realloc(nRealPointCount);
1433 drawing::PolyPolygonShape3D aClippedPoly;
1435 aRegressionPoly = aClippedPoly;
1438 awt::Point aDefaultPos;
1439 if( aRegressionPoly.SequenceX.hasElements() && aRegressionPoly.SequenceX[0].hasElements() )
1450 aDefaultPos = xShape->getPosition();
1455 if( xEquationProperties.is())
1459 xEquationProperties, xEquationTarget, xCalculator,
1467 const sal_Int32 nStringLength = aString.getLength();
1468 sal_Int32 nMaxLineLength = 0;
1470 for ( sal_Int32
i=0;
i<nStringLength;
i++ )
1472 sal_Int32 indexSep = aString.indexOf(
"\n",
i );
1474 indexSep = nStringLength;
1475 sal_Int32 nLineLength = indexSep -
i;
1476 if ( nLineLength > nMaxLineLength )
1477 nMaxLineLength = nLineLength;
1481 return nMaxLineLength;
1485 const OUString & rEquationCID,
1489 awt::Point aDefaultPos )
1491 OSL_ASSERT( xEquationProperties.is());
1492 if( !xEquationProperties.is())
1495 bool bShowEquation =
false;
1496 bool bShowCorrCoeff =
false;
1497 if(!(( xEquationProperties->getPropertyValue(
"ShowEquation") >>= bShowEquation ) &&
1498 ( xEquationProperties->getPropertyValue(
"ShowCorrelationCoefficient") >>= bShowCorrCoeff )))
1501 if( ! (bShowEquation || bShowCorrCoeff))
1504 OUStringBuffer aFormula;
1505 sal_Int32 nNumberFormatKey = 0;
1506 sal_Int32 nFormulaWidth = 0;
1508 bool bResizeEquation =
true;
1509 sal_Int32 nMaxIteration = 2;
1510 if ( bShowEquation )
1512 OUString aXName, aYName;
1513 if ( !(xEquationProperties->getPropertyValue(
"XName" ) >>= aXName) )
1514 aXName = OUString(
"x" );
1515 if ( !(xEquationProperties->getPropertyValue(
"YName" ) >>= aYName) )
1516 aYName = OUString(
"f(x)" );
1517 xRegressionCurveCalculator->setXYNames( aXName, aYName );
1520 for ( sal_Int32 nCountIteration = 0; bResizeEquation && nCountIteration < nMaxIteration ; nCountIteration++ )
1522 bResizeEquation =
false;
1528 aFormula = xRegressionCurveCalculator->getFormattedRepresentation(
1530 nNumberFormatKey, nFormulaWidth );
1535 aFormula = xRegressionCurveCalculator->getRepresentation();
1538 if( bShowCorrCoeff )
1540 aFormula.append(
"\n" );
1543 if( bShowCorrCoeff )
1546 double fR( xRegressionCurveCalculator->getCorrelationCoefficient());
1553 nNumberFormatKey, fR*fR, nLabelCol, bColChanged ));
1561 aFormula.append( ::rtl::math::doubleToUString(
1562 fR*fR, rtl_math_StringFormat_G, 4, aDecimalSep,
true ));
1566 awt::Point aScreenPosition2D;
1567 chart2::RelativePosition aRelativePosition;
1568 if( xEquationProperties->getPropertyValue(
"RelativePosition") >>= aRelativePosition )
1573 aScreenPosition2D.X =
static_cast< sal_Int32
>( ::rtl::math::round( fX ));
1574 aScreenPosition2D.Y =
static_cast< sal_Int32
>( ::rtl::math::round( fY ));
1577 aScreenPosition2D = aDefaultPos;
1579 if( !aFormula.isEmpty())
1587 xEquationTarget, aFormula.makeStringAndClear(),
1591 awt::Size aSize( xTextShape->getSize() );
1593 aScreenPosition2D, aSize, aRelativePosition.Anchor ) );
1600 if ( nFormulaWidth > 0 )
1602 bResizeEquation =
true;
1603 if ( nCountIteration < nMaxIteration-1 )
1604 xEquationTarget->remove( xTextShape );
1606 nFormulaWidth -= nCountIteration;
1607 if ( nFormulaWidth < 0 )
1615 if ( !bResizeEquation || nCountIteration == nMaxIteration-1 )
1616 xTextShape->setPosition(aPos);
1635 if (rDateCategories.empty())
1638 std::vector<double>::const_iterator aIt = rDateCategories.begin(), aEnd = rDateCategories.end();
1640 aIt = std::find_if(aIt, aEnd, [](
const double& rDateCategory) {
return !std::isnan(rDateCategory); });
1644 Date aNullDate(30,12,1899);
1648 Date aPrevious(aNullDate); aPrevious.
AddDays(rtl::math::approxFloor(*aIt));
1650 for(;aIt!=aEnd;++aIt)
1652 if (std::isnan(*aIt))
1655 Date aCurrent(aNullDate); aCurrent.
AddDays(rtl::math::approxFloor(*aIt));
1656 if( nRet == css::chart::TimeUnit::YEAR )
1659 nRet = css::chart::TimeUnit::MONTH;
1661 if( nRet == css::chart::TimeUnit::MONTH )
1664 nRet = css::chart::TimeUnit::DAY;
1666 if( nRet == css::chart::TimeUnit::DAY )
1675 double fMinimum, fMaximum;
1681 double fMinimum, fMaximum;
1690 double fMinY, fMaxY;
1695 double fMinimum = std::numeric_limits<double>::infinity();
1696 double fMaximum = -std::numeric_limits<double>::infinity();
1697 for(std::vector<VDataSeriesGroup> & rXSlots :
m_aZSlots)
1701 double fLocalMinimum, fLocalMaximum;
1702 rXSlot.calculateYMinAndMaxForCategoryRange(
1703 static_cast<sal_Int32
>(fMinimumX-1.0)
1704 ,
static_cast<sal_Int32
>(fMaximumX-1.0)
1706 , fLocalMinimum, fLocalMaximum, nAxisIndex );
1707 if(fMaximum<fLocalMaximum)
1708 fMaximum=fLocalMaximum;
1709 if(fMinimum>fLocalMinimum)
1710 fMinimum=fLocalMinimum;
1713 if(std::isinf(fMinimum))
1714 return std::numeric_limits<double>::quiet_NaN();
1722 double fMinY, fMaxY;
1727 double fMinimum = std::numeric_limits<double>::infinity();
1728 double fMaximum = -std::numeric_limits<double>::infinity();
1729 for( std::vector< VDataSeriesGroup > & rXSlots :
m_aZSlots)
1733 double fLocalMinimum, fLocalMaximum;
1734 rXSlot.calculateYMinAndMaxForCategoryRange(
1735 static_cast<sal_Int32
>(fMinimumX-1.0)
1736 ,
static_cast<sal_Int32
>(fMaximumX-1.0)
1738 , fLocalMinimum, fLocalMaximum, nAxisIndex );
1739 if(fMaximum<fLocalMaximum)
1740 fMaximum=fLocalMaximum;
1741 if(fMinimum>fLocalMinimum)
1742 fMinimum=fLocalMinimum;
1745 if(std::isinf(fMaximum))
1746 return std::numeric_limits<double>::quiet_NaN();
1764 bool lcl_isValueAxis( sal_Int32 nDimensionIndex,
bool bCategoryXAxis )
1767 if( nDimensionIndex == 0 )
1768 return !bCategoryXAxis;
1769 return nDimensionIndex == 1;
1787 return nDimensionIndex == 1;
1793 return nDimensionIndex == 1;
1799 return nDimensionIndex == 1;
1804 rfMinimum = std::numeric_limits<double>::infinity();
1805 rfMaximum = -std::numeric_limits<double>::infinity();
1809 for (
auto const& XSlot : ZSlot)
1811 double fLocalMinimum, fLocalMaximum;
1812 XSlot.getMinimumAndMaximumX( fLocalMinimum, fLocalMaximum );
1813 if( !std::isnan(fLocalMinimum) && fLocalMinimum< rfMinimum )
1814 rfMinimum = fLocalMinimum;
1815 if( !std::isnan(fLocalMaximum) && fLocalMaximum> rfMaximum )
1816 rfMaximum = fLocalMaximum;
1819 if(std::isinf(rfMinimum))
1820 rfMinimum = std::numeric_limits<double>::quiet_NaN();
1821 if(std::isinf(rfMaximum))
1822 rfMaximum = std::numeric_limits<double>::quiet_NaN();
1827 rfMinY = std::numeric_limits<double>::infinity();
1828 rfMaxY = -std::numeric_limits<double>::infinity();
1832 for (
auto const& XSlot : ZSlot)
1834 double fLocalMinimum, fLocalMaximum;
1835 XSlot.getMinimumAndMaximumYInContinuousXRange( fLocalMinimum, fLocalMaximum, fMinX, fMaxX, nAxisIndex );
1836 if( !std::isnan(fLocalMinimum) && fLocalMinimum< rfMinY )
1837 rfMinY = fLocalMinimum;
1838 if( !std::isnan(fLocalMaximum) && fLocalMaximum> rfMaxY )
1839 rfMaxY = fLocalMaximum;
1842 if(std::isinf(rfMinY))
1843 rfMinY = std::numeric_limits<double>::quiet_NaN();
1844 if(std::isinf(rfMaxY))
1845 rfMaxY = std::numeric_limits<double>::quiet_NaN();
1854 for (
auto const& XSlot : ZSlot)
1856 sal_Int32 nPointCount = XSlot.getPointCount();
1857 if( nPointCount>nRet )
1889 sal_Int32 nPointCount = pSeries->getTotalPointCount();
1890 if( nPointCount>nRet )
1913 rfMinimum = std::numeric_limits<double>::infinity();
1914 rfMaximum = -std::numeric_limits<double>::infinity();
1918 sal_Int32 nPointCount = pSeries->getTotalPointCount();
1919 for(sal_Int32 nN=0;nN<nPointCount;nN++)
1921 double fX = pSeries->getXValue( nN );
1922 if( std::isnan(fX) )
1930 if(std::isinf(rfMinimum))
1931 rfMinimum = std::numeric_limits<double>::quiet_NaN();
1932 if(std::isinf(rfMaximum))
1933 rfMaximum = std::numeric_limits<double>::quiet_NaN();
1952class PerXMinMaxCalculator
1954 typedef std::pair<double, double> MinMaxType;
1955 typedef std::map<size_t, MinMaxType> SeriesMinMaxType;
1956 typedef std::map<double, SeriesMinMaxType> GroupMinMaxType;
1957 typedef std::unordered_map<double, MinMaxType> TotalStoreType;
1966 void setValue(
double fX,
double fY)
1968 SeriesMinMaxType* pStore = getByXValue(fX);
1973 SeriesMinMaxType::iterator it = pStore->lower_bound(
mnCurSeries);
1974 if (it != pStore->end() && !pStore->key_comp()(
mnCurSeries, it->first))
1976 MinMaxType& r = it->second;
1987 it, SeriesMinMaxType::value_type(
1992 void getTotalRange(
double& rfMin,
double& rfMax)
const
1994 TotalStoreType aStore;
1995 getTotalStore(aStore);
1999 rfMin = std::numeric_limits<double>::quiet_NaN();
2000 rfMax = std::numeric_limits<double>::quiet_NaN();
2004 TotalStoreType::const_iterator it = aStore.begin(), itEnd = aStore.end();
2005 rfMin = it->second.first;
2006 rfMax = it->second.second;
2007 for (++it; it != itEnd; ++it)
2009 if (rfMin > it->second.first)
2010 rfMin = it->second.first;
2011 if (rfMax < it->second.second)
2012 rfMax = it->second.second;
2021 void getTotalStore(TotalStoreType& rStore)
const
2023 TotalStoreType aStore;
2026 double fX = it.first;
2028 const SeriesMinMaxType& rSeries = it.second;
2029 for (
auto const& series : rSeries)
2031 double fYMin = series.second.first, fYMax = series.second.second;
2032 TotalStoreType::iterator itr = aStore.find(fX);
2033 if (itr == aStore.end())
2035 aStore.emplace(fX, std::pair<double,double>(fYMin,fYMax));
2038 MinMaxType& r = itr->second;
2039 if (fYMin < r.first)
2046 rStore.swap(aStore);
2049 SeriesMinMaxType* getByXValue(
double fX)
2054 std::pair<GroupMinMaxType::iterator,bool> r =
2055 m_SeriesGroup.insert(std::make_pair(fX, SeriesMinMaxType{}));
2071 double& rfMinY,
double& rfMaxY,
double fMinX,
double fMaxX, sal_Int32 nAxisIndex )
const
2073 rfMinY = std::numeric_limits<double>::quiet_NaN();
2074 rfMaxY = std::numeric_limits<double>::quiet_NaN();
2080 PerXMinMaxCalculator aRangeCalc;
2086 for (sal_Int32
i = 0,
n = pSeries->getTotalPointCount();
i <
n; ++
i)
2088 if (nAxisIndex != pSeries->getAttachedAxisIndex())
2091 double fX = pSeries->getXValue(
i);
2095 if (fX < fMinX || fX > fMaxX)
2099 double fY = pSeries->getYValue(
i);
2103 aRangeCalc.setValue(fX, fY);
2105 aRangeCalc.nextSeries();
2108 aRangeCalc.getTotalRange(rfMinY, rfMaxY);
2112 ,
bool bSeparateStackingForDifferentSigns
2113 ,
double& rfMinimumY,
double& rfMaximumY, sal_Int32 nAxisIndex )
const
2115 assert(nCategoryIndex >= 0);
2118 rfMinimumY = std::numeric_limits<double>::infinity();
2119 rfMaximumY = -std::numeric_limits<double>::infinity();
2133 double fTotalSum = std::numeric_limits<double>::quiet_NaN();
2134 double fPositiveSum = std::numeric_limits<double>::quiet_NaN();
2135 double fNegativeSum = std::numeric_limits<double>::quiet_NaN();
2136 double fFirstPositiveY = std::numeric_limits<double>::quiet_NaN();
2137 double fFirstNegativeY = std::numeric_limits<double>::quiet_NaN();
2139 if( bSeparateStackingForDifferentSigns )
2143 if( nAxisIndex != pSeries->getAttachedAxisIndex() )
2146 double fValueMinY = pSeries->getMinimumofAllDifferentYValues( nCategoryIndex );
2147 double fValueMaxY = pSeries->getMaximumofAllDifferentYValues( nCategoryIndex );
2149 if( fValueMaxY >= 0 )
2151 if( std::isnan( fPositiveSum ) )
2152 fPositiveSum = fFirstPositiveY = fValueMaxY;
2154 fPositiveSum += fValueMaxY;
2156 if( fValueMinY < 0 )
2158 if(std::isnan( fNegativeSum ))
2159 fNegativeSum = fFirstNegativeY = fValueMinY;
2161 fNegativeSum += fValueMinY;
2164 rfMinimumY = std::isnan( fNegativeSum ) ? fFirstPositiveY : fNegativeSum;
2165 rfMaximumY = std::isnan( fPositiveSum ) ? fFirstNegativeY : fPositiveSum;
2171 if( nAxisIndex != pSeries->getAttachedAxisIndex() )
2174 double fValueMinY = pSeries->getMinimumofAllDifferentYValues( nCategoryIndex );
2175 double fValueMaxY = pSeries->getMaximumofAllDifferentYValues( nCategoryIndex );
2177 if( std::isnan( fTotalSum ) )
2179 rfMinimumY = fValueMinY;
2180 rfMaximumY = fTotalSum = fValueMaxY;
2184 fTotalSum += fValueMaxY;
2185 if( rfMinimumY > fTotalSum )
2186 rfMinimumY = fTotalSum;
2187 if( rfMaximumY < fTotalSum )
2188 rfMaximumY = fTotalSum;
2200 sal_Int32 nStartCategoryIndex, sal_Int32 nEndCategoryIndex
2201 ,
bool bSeparateStackingForDifferentSigns
2202 ,
double& rfMinimumY,
double& rfMaximumY, sal_Int32 nAxisIndex )
2205 rfMinimumY = std::numeric_limits<double>::infinity();
2206 rfMaximumY = -std::numeric_limits<double>::infinity();
2209 if(nStartCategoryIndex<0)
2210 nStartCategoryIndex=0;
2212 if(nPointCount <= 0)
2214 if (nEndCategoryIndex >= nPointCount)
2215 nEndCategoryIndex = nPointCount - 1;
2216 if(nEndCategoryIndex<0)
2217 nEndCategoryIndex=0;
2218 for( sal_Int32 nCatIndex = nStartCategoryIndex; nCatIndex <= nEndCategoryIndex; nCatIndex++ )
2220 double fMinimumY = std::numeric_limits<double>::quiet_NaN();
2221 double fMaximumY = std::numeric_limits<double>::quiet_NaN();
2224 , bSeparateStackingForDifferentSigns, fMinimumY, fMaximumY, nAxisIndex );
2226 if(rfMinimumY > fMinimumY)
2227 rfMinimumY = fMinimumY;
2228 if(rfMaximumY < fMaximumY)
2229 rfMaximumY = fMaximumY;
2258 pRet = aPosIt->second.get();
2282 for (std::vector<VDataSeriesGroup>
const & rGroup :
m_aZSlots)
2284 if (!rGroup.empty())
2286 if (!rGroup[0].m_aSeriesVector.empty())
2288 VDataSeries* pSeries = rGroup[0].m_aSeriesVector[0].get();
2302 if (nPointIndex >= 0 && nPointIndex < aCategories.getLength())
2304 return aCategories[nPointIndex];
2312 std::vector<VDataSeries const*> aAllSeries;
2313 for (std::vector<VDataSeriesGroup>
const & rXSlot :
m_aZSlots)
2317 for (std::unique_ptr<VDataSeries>
const &
p : rGroup.m_aSeriesVector)
2318 aAllSeries.push_back(
p.get());
2327 std::vector<VDataSeries*> aAllSeries;
2328 for (std::vector<VDataSeriesGroup>
const & rXSlot :
m_aZSlots)
2332 for (std::unique_ptr<VDataSeries>
const &
p : rGroup.m_aSeriesVector)
2333 aAllSeries.push_back(
p.get());
2341 std::vector<OUString> aRetVector;
2349 if (!rGroup.empty())
2358 OUString aSeriesName( xSeries->getLabelForRole( aRole ) );
2359 aRetVector.push_back( aSeriesName );
2369 std::vector<OUString> aRetVector;
2379 OUString aSeriesName(pSeries->getModel()->getLabelForRole(aRole));
2380 aRetVector.push_back(aSeriesName);
2395 for (std::unique_ptr<VDataSeries>
const & pSeries : rGroup.m_aSeriesVector)
2419 const awt::Size& rEntryKeyAspectRatio
2420 , LegendPosition eLegendPosition
2424 , ChartModel& rModel
2427 std::vector< ViewLegendEntry > aResult;
2433 bool bSwapXAndY =
false;
2437 xCooSys->getPropertyValue(
"SwapXAndYAxis" ) >>= bSwapXAndY;
2439 catch(
const uno::Exception& )
2444 bool bBreak =
false;
2445 bool bFirstSeries =
true;
2448 for (std::vector<VDataSeriesGroup>
const & rGroupVector :
m_aZSlots)
2452 for (std::unique_ptr<VDataSeries>
const & pSeries : rGroup.m_aSeriesVector)
2463 std::vector<ViewLegendEntry> aSeriesEntries(
2465 rEntryKeyAspectRatio, *pSeries, xTextProperties,
2471 if (bFirstSeries && pSeries->isVaryColorsByPoint())
2473 bFirstSeries =
false;
2478 bool bReverse =
false;
2481 StackingDirection eStackingDirection( pSeries->getStackingDirection() );
2482 bReverse = ( eStackingDirection != StackingDirection_Y_STACKING );
2484 else if ( eLegendPosition == LegendPosition_LINE_START || eLegendPosition == LegendPosition_LINE_END )
2486 StackingDirection eStackingDirection( pSeries->getStackingDirection() );
2487 bReverse = ( eStackingDirection == StackingDirection_Y_STACKING );
2491 aResult.insert( aResult.begin(), aSeriesEntries.begin(), aSeriesEntries.end() );
2493 aResult.insert( aResult.end(), aSeriesEntries.begin(), aSeriesEntries.end() );
2508 std::vector<ViewLegendSymbol> aResult;
2512 bool bBreak =
false;
2513 bool bFirstSeries =
true;
2515 for (std::vector<VDataSeriesGroup>
const & rGroupVector :
m_aZSlots)
2519 for (std::unique_ptr<VDataSeries>
const & pSeries : rGroup.m_aSeriesVector)
2529 if (bFirstSeries && pSeries->isVaryColorsByPoint())
2532 bFirstSeries =
false;
2534 aResult.insert(aResult.end(), aSeriesSymbols.begin(), aSeriesSymbols.end());
2549 bool bHasVisibleLine =
false;
2550 rbHasDashedLine =
false;
2551 drawing::LineStyle aLineStyle = drawing::LineStyle_NONE;
2552 if( xProps.is() && ( xProps->getPropertyValue(
"LineStyle") >>= aLineStyle ) )
2554 if( aLineStyle != drawing::LineStyle_NONE )
2555 bHasVisibleLine =
true;
2556 if( aLineStyle == drawing::LineStyle_DASH )
2557 rbHasDashedLine =
true;
2559 return bHasVisibleLine;
2562bool lcl_HasRegressionCurves(
const VDataSeries& rSeries,
bool& rbHasDashedLine )
2564 bool bHasRegressionCurves =
false;
2568 bHasRegressionCurves =
true;
2569 lcl_HasVisibleLine( rCurve, rbHasDashedLine );
2571 return bHasRegressionCurves;
2581 awt::Size aRet(1000,1000);
2586 bool bHasLines =
false;
2587 bool bHasDashedLines =
false;
2591 if( bSeriesAllowsLines )
2593 bool bCurrentDashed =
false;
2594 if( lcl_HasVisibleLine( pSeries->getPropertiesOfSeries(), bCurrentDashed ) )
2597 if( bCurrentDashed )
2599 bHasDashedLines =
true;
2604 bool bRegressionHasDashedLines=
false;
2605 if( lcl_HasRegressionCurves( *pSeries, bRegressionHasDashedLines ) )
2608 if( bRegressionHasDashedLines )
2610 bHasDashedLines =
true;
2617 if( bHasDashedLines )
2618 aRet = awt::Size(1600,-1);
2620 aRet = awt::Size(800,-1);
2631 const awt::Size& rEntryKeyAspectRatio
2644 switch( eLegendSymbolStyle )
2660 const awt::Size& rEntryKeyAspectRatio
2662 , sal_Int32 nPointIndex
2674 switch( eLegendSymbolStyle )
2696 xPointSet.set( xCloneable->createClone(), uno::UNO_QUERY );
2699 xChild->setParent( xSeriesProps );
2701 OSL_ASSERT( xPointSet.is());
2702 xPointSet->setPropertyValue(
2708 xTarget, eLegendSymbolStyle, xPointSet, ePropType, aExplicitSymbol );
2714 const awt::Size& rEntryKeyAspectRatio
2721 std::vector< ViewLegendEntry > aResult;
2723 if( ! (
xTarget.is() && xContext.is() ) )
2729 OUString aLabelText;
2737 bool bDonut =
false;
2743 catch (
const uno::Exception&)
2747 if (bVaryColorsByPoint || bIsPie)
2758 catch (
const uno::Exception&)
2761 for( sal_Int32 nIdx=0; nIdx<aCategoryNames.getLength(); ++nIdx )
2763 bool deletedLegendEntry =
false;
2764 for (
const auto& deletedLegendEntryIdx : std::as_const(deletedLegendEntries))
2766 if (nIdx == deletedLegendEntryIdx)
2768 deletedLegendEntry =
true;
2772 if (deletedLegendEntry)
2780 rSeries, nIdx, xSymbolGroup );
2785 aEntry.
xSymbol = xSymbolGroup;
2794 aLabelText = aCategoryNames[nIdx];
2795 if( xShape.is() || !aLabelText.isEmpty() )
2798 aResult.push_back(aEntry);
2809 rEntryKeyAspectRatio, rSeries, xSymbolGroup );
2814 aEntry.
xSymbol = xSymbolGroup;
2825 aResult.push_back(aEntry);
2836 const std::vector< rtl::Reference< RegressionCurveModel > > & aCurves = xRegrCont->getRegressionCurves2();
2837 sal_Int32
i = 0,
nCount = aCurves.size();
2857 aEntry.
xSymbol = xSymbolGroup;
2867 aResult.push_back(aEntry);
2871 catch(
const uno::Exception & )
2879 const awt::Size& rEntryKeyAspectRatio
2884 std::vector<ViewLegendSymbol> aResult;
2886 if (!(
xTarget.is() && xContext.is()))
2901 aEntry.
xSymbol = xSymbolGroup;
2902 aResult.push_back(aEntry);
2905 catch (
const uno::Exception &)
2914 , sal_Int32 nDimensionCount
2915 ,
bool bExcludingPositioning )
2917 if (!xChartTypeModel.is())
2920 OUString aChartType = xChartTypeModel->getChartType();
2924 pRet =
new BarChart(xChartTypeModel,nDimensionCount);
2926 pRet =
new BarChart(xChartTypeModel,nDimensionCount);
2928 pRet =
new AreaChart(xChartTypeModel,nDimensionCount,
true);
2930 pRet =
new AreaChart(xChartTypeModel,nDimensionCount,
true,
true);
2932 pRet =
new AreaChart(xChartTypeModel,nDimensionCount,
false,
true);
2934 pRet =
new BubbleChart(xChartTypeModel,nDimensionCount);
2936 pRet =
new PieChart(xChartTypeModel,nDimensionCount, bExcludingPositioning );
2938 pRet =
new NetChart(xChartTypeModel,nDimensionCount,
true,std::make_unique<PolarPlottingPositionHelper>());
2940 pRet =
new NetChart(xChartTypeModel,nDimensionCount,
false,std::make_unique<PolarPlottingPositionHelper>());
2944 pRet =
new AreaChart(xChartTypeModel,nDimensionCount,
false,
true);
const sal_Unicode aSuperscriptFigures[10]
constexpr auto convertPointToMm100(N n)
GroupMinMaxType m_SeriesGroup
const LocaleDataWrapper & GetLocaleDataWrapper() const
static const AllSettings & GetSettings()
void AddDays(sal_Int32 nAddDays)
const OUString & getNumDecimalSep() const
static bool isSeriesInFrontOfAxisLine(const rtl::Reference< ::chart::ChartType > &xChartType)
static bool isSupportingStatisticProperties(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static void clipPolygonAtRectangle(const css::drawing::PolyPolygonShape3D &rPolygon, const ::basegfx::B2DRectangle &rRectangle, css::drawing::PolyPolygonShape3D &aResult, bool bSplitPiecesToDifferentPolygons=true)
This class uses the Liang-Biarsky parametric line-clipping algorithm as described in: Computer Graphi...
static bool IsInSameMonth(const Date &rD1, const Date &rD2)
static bool IsInSameYear(const Date &rD1, const Date &rD2)
static sal_Int32 getPercentNumberFormat(const css::uno::Reference< css::util::XNumberFormatsSupplier > &xNumberFormatsSupplier)
const std::vector< double > & getDateCategories()
css::uno::Sequence< OUString > const & getSimpleCategories()
css::uno::Reference< css::chart2::data::XDataSequence > getOriginalCategories()
static void correctPositionForRotation(const rtl::Reference< SvxShapeText > &xShape2DText, LabelAlignment eLabelAlignment, const double fRotationAngle, bool bRotateAroundCenter)
static void changeTextAdjustment(tAnySequence &rPropValues, const tNameSequence &rPropNames, LabelAlignment eAlignment)
static OUString createChildParticleWithIndex(ObjectType eObjectType, sal_Int32 nIndex)
static OUString createClassifiedIdentifierForParticles(std::u16string_view rParentParticle, std::u16string_view rChildParticle, std::u16string_view rDragMethodServiceName=std::u16string_view(), std::u16string_view rDragParameterString=std::u16string_view())
static OUString addChildParticle(std::u16string_view rParticle, std::u16string_view rChildParticle)
static OUString createPointCID(std::u16string_view rPointCID_Stub, sal_Int32 nIndex)
This class provides methods for setting axis scales and for performing scene to screen transformation...
PlottingPositionHelper * m_pPosHelper
const sal_Int32 m_nDimension
rtl::Reference< SvxShapeGroupAnyD > createGroupShape(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const OUString &rName=OUString())
double getLogicMaxX() const
double getLogicMinZ() const
css::drawing::Direction3D getScaledLogicWidth() const
const std::vector< ExplicitScaleData > & getScales() const
double getLogicMinX() const
::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 setTimeResolution(tools::Long nTimeResolution, const Date &rNullDate)
double getLogicMaxZ() const
std::unique_ptr< PlottingPositionHelper > createSecondaryPosHelper(const ExplicitScaleData &rSecondaryScale)
static const tPropertyNameMap & getPropertyNameMapForLineProperties()
static void getPreparedTextShapePropertyLists(const css::uno::Reference< css::beans::XPropertySet > &xSourceProp, tNameSequence &rPropNames, tAnySequence &rPropValues)
adds line-, fill- and character properties and sets some suitable defaults for auto-grow properties
static void setMappedProperties(const css::uno::Reference< css::beans::XPropertySet > &xTarget, const css::uno::Reference< css::beans::XPropertySet > &xSource, const tPropertyNameMap &rMap)
static css::awt::Point getUpperLeftCornerOfAnchoredObject(css::awt::Point aPoint, css::awt::Size aObjectSize, css::drawing::Alignment aAnchor)
returns the upper left corner of an object that has size aObjectSize and where the point indicated by...
static void setShapeName(const rtl::Reference< SvxShape > &xShape, const OUString &rName)
static rtl::Reference< SvxShapeText > createText(const rtl::Reference< SvxShapeGroupAnyD > &xTarget2D, const OUString &rText, const tNameSequence &rPropNames, const tAnySequence &rPropValues, const css::uno::Any &rATransformation)
static rtl::Reference< SvxShapePolyPolygon > createLine2D(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::drawing::PointSequenceSequence &rPoints, const VLineProperties *pLineProperties=nullptr)
static rtl::Reference< SvxShapeGroup > createGroup2D(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const OUString &aName=OUString())
static css::uno::Any makeTransformation(const css::awt::Point &rScreenPosition2D, double fRotationAnglePi=0.0)
A list of series that have the same CoordinateSystem.
sal_Int32 m_nMaxPointCount
void calculateYMinAndMaxForCategory(sal_Int32 nCategoryIndex, bool bSeparateStackingForDifferentSigns, double &rfMinimumY, double &rfMaximumY, sal_Int32 nAxisIndex) const
std::vector< tCachedYValuesPerAxisIndexMap > m_aListOfCachedYValues
void getMinimumAndMaximumX(double &rfMinimum, double &rfMaximum) const
sal_Int32 getPointCount() const
bool m_bMaxPointCountDirty
sal_Int32 getAttachedAxisIndexForFirstSeries() const
void calculateYMinAndMaxForCategoryRange(sal_Int32 nStartCategoryIndex, sal_Int32 nEndCategoryIndex, bool bSeparateStackingForDifferentSigns, double &rfMinimumY, double &rfMaximumY, sal_Int32 nAxisIndex)
VDataSeriesGroup()=delete
sal_Int32 getSeriesCount() const
void getMinimumAndMaximumYInContinuousXRange(double &rfMinY, double &rfMaxY, double fMinX, double fMaxX, sal_Int32 nAxisIndex) const
std::vector< std::unique_ptr< VDataSeries > > m_aSeriesVector
void addSeries(std::unique_ptr< VDataSeries > pSeries)
rtl::Reference< SvxShapeGroupAnyD > m_xGroupShape
bool hasExplicitNumberFormat(sal_Int32 nPointIndex, bool bForPercentage) const
css::awt::Point getLabelPosition(css::awt::Point aTextShapePos, sal_Int32 nPointIndex) const
sal_Int32 getExplicitNumberFormat(sal_Int32 nPointIndex, bool bForPercentage) const
OUString getDataCurveCID(sal_Int32 nCurveIndex, bool bAverageLine) const
void getMinMaxXValue(double &fMin, double &fMax) const
double getYMeanValue() const
rtl::Reference< SvxShapeGroupAnyD > m_xErrorYBarsGroupShape
bool isVaryColorsByPoint() const
const css::uno::Reference< css::beans::XPropertySet > & getPropertiesOfSeries() const
css::uno::Sequence< double > const & getAllX() const
css::uno::Reference< css::beans::XPropertySet > getPropertiesOfPoint(sal_Int32 index) const
rtl::Reference< SvxShapeGroup > m_xLabelsGroupShape
rtl::Reference< SvxShapeGroupAnyD > m_xErrorXBarsGroupShape
css::chart2::DataPointLabel * getDataPointLabelIfLabel(sal_Int32 index) const
css::uno::Reference< css::beans::XPropertySet > getXErrorBarProperties(sal_Int32 index) const
const rtl::Reference<::chart::DataSeries > & getModel() const
rtl::Reference< SvxShapeGroupAnyD > m_xBackSubGroupShape
OUString getErrorBarsCID(bool bYError) const
bool isAttributedDataPoint(sal_Int32 index) const
const OUString & getLabelCID_Stub() const
const OUString & getCID() const
sal_Int32 detectNumberFormatKey(sal_Int32 nPointIndex) const
bool hasPointOwnColor(sal_Int32 index) const
double getXMeanValue() const
OUString getDataCurveEquationCID(sal_Int32 nCurveIndex) const
css::uno::Sequence< double > const & getAllY() const
css::uno::Reference< css::beans::XPropertySet > getYErrorBarProperties(sal_Int32 index) const
bool getTextLabelMultiPropertyLists(sal_Int32 index, tNameSequence *&pPropNames, tAnySequence *&pPropValues) const
bool isLabelCustomPos(sal_Int32 nPointIndex) const
const OUString & getSeriesParticle() const
rtl::Reference< SvxShapeGroupAnyD > m_xFrontSubGroupShape
OUString getLabelsCID() const
virtual std::vector< ViewLegendEntry > createLegendEntries(const css::awt::Size &rEntryKeyAspectRatio, css::chart2::LegendPosition eLegendPosition, const css::uno::Reference< css::beans::XPropertySet > &xTextProperties, const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::uno::Reference< css::uno::XComponentContext > &xContext, ChartModel &rModel) override
ExplicitCategoriesProvider * m_pExplicitCategoriesProvider
void getMinimumAndMaximumX(double &rfMinimum, double &rfMaximum) const
virtual bool isExpandWideValuesToZero(sal_Int32 nDimensionIndex) override
std::vector< ViewLegendSymbol > createSymbolsForSeries(const css::awt::Size &rEntryKeyAspectRatio, const VDataSeries &rSeries, const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::uno::Reference< css::uno::XComponentContext > &xContext)
void createErrorBar_X(const css::drawing::Position3D &rUnscaledLogicPosition, VDataSeries &rVDataSeries, sal_Int32 nPointIndex, const rtl::Reference< SvxShapeGroupAnyD > &xTarget)
css::uno::Sequence< sal_Int32 > m_aCoordinateSystemResolution
double getTransformedDepth() const
static rtl::Reference< SvxShapeGroup > getLabelsGroupShape(VDataSeries &rDataSeries, const rtl::Reference< SvxShapeGroupAnyD > &xTarget)
This method creates a 2D group shape for containing all text shapes needed for this series; the group...
void addSecondaryValueScale(const ExplicitScaleData &rScale, sal_Int32 nAxisIndex)
this enables you to handle series on the same x axis with different y axis the property AttachedAxisI...
std::vector< ViewLegendEntry > createLegendEntriesForSeries(const css::awt::Size &rEntryKeyAspectRatio, const VDataSeries &rSeries, const css::uno::Reference< css::beans::XPropertySet > &xTextProperties, const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::uno::Reference< css::uno::XComponentContext > &xContext)
rtl::Reference< SvxShapeText > createDataLabel(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, VDataSeries &rDataSeries, sal_Int32 nPointIndex, double fValue, double fSumValue, const css::awt::Point &rScreenPosition2D, LabelAlignment eAlignment, sal_Int32 nOffset=0, sal_Int32 nTextWidth=0)
This method creates a text shape for a label related to a data point and append it to the root text s...
css::awt::Size m_aPageReferenceSize
void createErrorBar_Y(const css::drawing::Position3D &rUnscaledLogicPosition, VDataSeries &rVDataSeries, sal_Int32 nPointIndex, const rtl::Reference< SvxShapeGroupAnyD > &xTarget, double const *pfScaledLogicX)
virtual double getMinimumX() override
virtual bool isExpandNarrowValuesTowardZero(sal_Int32 nDimensionIndex) override
css::uno::Reference< css::chart2::XColorScheme > m_xColorScheme
static void addErrorBorder(const css::drawing::Position3D &rPos0, const css::drawing::Position3D &rPos1, const rtl::Reference< SvxShapeGroupAnyD > &rTarget, const css::uno::Reference< css::beans::XPropertySet > &rErrorBorderProp)
rtl::Reference< SvxShapeGroup > createLegendSymbolForSeries(const css::awt::Size &rEntryKeyAspectRatio, const VDataSeries &rSeries, const rtl::Reference< SvxShapeGroupAnyD > &xTarget)
sal_Int32 getPointCount() const
virtual ~VSeriesPlotter() override
PlottingPositionHelper * m_pMainPosHelper
virtual double getMaximumYInRange(double fMinimumX, double fMaximumX, sal_Int32 nAxisIndex) override
void setNumberFormatsSupplier(const css::uno::Reference< css::util::XNumberFormatsSupplier > &xNumFmtSupplier)
static VSeriesPlotter * createSeriesPlotter(const rtl::Reference< ::chart::ChartType > &xChartTypeModel, sal_Int32 nDimensionCount, bool bExcludingPositioning)
std::unique_ptr< NumberFormatterWrapper > m_apNumberFormatterWrapper
virtual bool isExpandIfValuesCloseToBorder(sal_Int32 nDimensionIndex) override
virtual tools::Long calculateTimeResolutionOnXAxis() override
virtual void setTimeResolutionOnXAxis(tools::Long nTimeResolution, const Date &rNullDate) override
rtl::Reference< SvxShapeGroupAnyD > getSeriesGroupShapeBackChild(VDataSeries *pDataSeries, const rtl::Reference< SvxShapeGroupAnyD > &xTarget)
virtual css::awt::Size getPreferredLegendKeyAspectRatio() override
tSecondaryValueScales m_aSecondaryValueScales
rtl::Reference< SvxShapeGroupAnyD > getSeriesGroupShape(VDataSeries *pDataSeries, const rtl::Reference< SvxShapeGroupAnyD > &xTarget)
void createRegressionCurveEquationShapes(const OUString &rEquationCID, const css::uno::Reference< css::beans::XPropertySet > &xEquationProperties, const rtl::Reference< SvxShapeGroupAnyD > &xEquationTarget, const css::uno::Reference< css::chart2::XRegressionCurveCalculator > &xRegressionCurveCalculator, css::awt::Point aDefaultPos)
virtual double getMaximumZ() override
std::vector< ViewLegendSymbol > createSymbols(const css::awt::Size &rEntryKeyAspectRatio, const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::uno::Reference< css::uno::XComponentContext > &xContext)
virtual PlottingPositionHelper & getPlottingPositionHelper(sal_Int32 nAxisIndex) const
void setPageReferenceSize(const css::awt::Size &rPageRefSize)
virtual bool shouldSnapRectToUsedArea()
void setCoordinateSystemResolution(const css::uno::Sequence< sal_Int32 > &rCoordinateSystemResolution)
virtual double getMaximumX() override
std::vector< std::vector< VDataSeriesGroup > > m_aZSlots
virtual LegendSymbolStyle getLegendSymbolStyle()
void createRegressionCurvesShapes(VDataSeries const &rVDataSeries, const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const rtl::Reference< SvxShapeGroupAnyD > &xEquationTarget, bool bMaySkipPointsInRegressionCalculation)
rtl::Reference< ::chart::ChartType > m_xChartTypeModel
virtual double getMinimumYInRange(double fMinimumX, double fMaximumX, sal_Int32 nAxisIndex) override
virtual css::drawing::Direction3D getPreferredDiagramAspectRatio() const
a value <= 0 for a directions means that this direction can be stretched arbitrary
rtl::Reference< SvxShapeGroupAnyD > getSeriesGroupShapeFrontChild(VDataSeries *pDataSeries, const rtl::Reference< SvxShapeGroupAnyD > &xTarget)
bool WantToPlotInFrontOfAxisLine()
virtual css::uno::Any getExplicitSymbol(const VDataSeries &rSeries, sal_Int32 nPointIndex)
void createErrorRectangle(const css::drawing::Position3D &rUnscaledLogicPosition, VDataSeries &rVDataSeries, sal_Int32 nIndex, const rtl::Reference< SvxShapeGroupAnyD > &rTarget, bool bUseXErrorData, bool bUseYErrorData)
virtual void rearrangeLabelToAvoidOverlapIfRequested(const css::awt::Size &rPageSize)
css::uno::Sequence< OUString > getAllSeriesNames() const
bool m_bPieLabelsAllowToMove
virtual bool isSeparateStackingForDifferentSigns(sal_Int32 nDimensionIndex) override
rtl::Reference< SvxShapeGroupAnyD > getErrorBarsGroupShape(VDataSeries &rDataSeries, const rtl::Reference< SvxShapeGroupAnyD > &xTarget, bool bYError)
virtual void addSeries(std::unique_ptr< VDataSeries > pSeries, sal_Int32 zSlot, sal_Int32 xSlot, sal_Int32 ySlot)
A new series can be positioned relative to other series in a chart.
tools::Long m_nTimeResolution
rtl::Reference< SvxShapeGroup > createLegendSymbolForPoint(const css::awt::Size &rEntryKeyAspectRatio, const VDataSeries &rSeries, sal_Int32 nPointIndex, const rtl::Reference< SvxShapeGroupAnyD > &xTarget)
css::uno::Sequence< OUString > getSeriesNames() const
tSecondaryPosHelperMap m_aSecondaryPosHelperMap
VDataSeries * getFirstSeries() const
std::vector< VDataSeries * > getAllSeries()
virtual bool isExpandBorderToIncrementRhythm(sal_Int32 nDimensionIndex) override
OUString getCategoryName(sal_Int32 nPointIndex) const
void createErrorBar(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::drawing::Position3D &rPos, const css::uno::Reference< css::beans::XPropertySet > &xErrorBarProperties, const VDataSeries &rVDataSeries, sal_Int32 nIndex, bool bVertical, const double *pfScaledLogicX)
creates two T-shaped error bars in both directions (up/down or left/right depending on the bVertical ...
void setColorScheme(const css::uno::Reference< css::chart2::XColorScheme > &xColorScheme)
virtual double getMinimumZ() override
OUString getLabelTextForValue(VDataSeries const &rDataSeries, sal_Int32 nPointIndex, double fValue, bool bAsPercentage)
This method returns a text string representation of the passed numeric value by exploiting a NumberFo...
void setExplicitCategoriesProvider(ExplicitCategoriesProvider *pExplicitCategoriesProvider)
void getMinimumAndMaximumYInContinuousXRange(double &rfMinY, double &rfMaxY, double fMinX, double fMaxX, sal_Int32 nAxisIndex) const
constexpr double FIXED_SIZE_FOR_3D_CHART_VOLUME
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
Reference< XInterface > xTarget
#define SAL_WARN_IF(condition, area, stream)
constexpr OUStringLiteral aData
constexpr double deg2rad(double v)
OOO_DLLPUBLIC_CHARTTOOLS::basegfx::B2IRectangle makeRectangle(const css::awt::Point &rPosition, const css::awt::Size &rSize)
@ PROP_DATASERIES_DELETED_LEGEND_ENTRIES
@ PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES
@ PROP_DATASERIES_SHOW_LEGEND_ENTRY
OOO_DLLPUBLIC_CHARTTOOLS bool isMeanValueLine(const css::uno::Reference< css::chart2::XRegressionCurve > &xRegCurve)
OOO_DLLPUBLIC_CHARTTOOLS OUString getUINameForRegressionCurve(const css::uno::Reference< css::chart2::XRegressionCurve > &xCurve)
OOO_DLLPUBLIC_CHARTTOOLS double getStandardDeviation(const css::uno::Sequence< double > &rData)
OOO_DLLPUBLIC_CHARTTOOLS double getStandardError(const css::uno::Sequence< double > &rData)
OOO_DLLPUBLIC_CHARTTOOLS double getErrorFromDataSource(const css::uno::Reference< css::chart2::data::XDataSource > &xDataSource, sal_Int32 nIndex, bool bPositiveValue, bool bYError=true)
OOO_DLLPUBLIC_CHARTTOOLS double getVariance(const css::uno::Sequence< double > &rData)
Calculates 1/n * sum (x_i - x_mean)^2.
rtl::Reference< SvxShapeGroup > createSymbol(const css::awt::Size &rEntryKeyAspectRatio, const rtl::Reference< SvxShapeGroupAnyD > &rSymbolContainer, LegendSymbolStyle eStyle, const css::uno::Reference< css::beans::XPropertySet > &xLegendEntryProperties, PropertyType ePropertyType, const css::uno::Any &rExplicitSymbol)
@ OBJECTTYPE_LEGEND_ENTRY
@ OBJECTTYPE_DATA_AVERAGE_LINE
OOO_DLLPUBLIC_CHARTTOOLS bool replaceParamterInString(OUString &rInOutResourceString, std::u16string_view rParamToReplace, std::u16string_view rReplaceWith)
@ PROP_PIECHARTTYPE_USE_RINGS
OOO_DLLPUBLIC_CHARTTOOLS void AddPointToPoly(css::drawing::PolyPolygonShape3D &rPoly, const css::drawing::Position3D &rPos, sal_Int32 nSequenceIndex=0)
PolyPolygonShape3D + drawing::Position3D -> PolyPolygonShape3D.
css::uno::Sequence< OUString > tNameSequence
@ Box
A square box with border.
@ Line
A line like with a symbol.
static sal_Int32 lcl_getOUStringMaxLineLength(OUStringBuffer const &aString)
@ LABEL_ALIGN_RIGHT_BOTTOM
@ LABEL_ALIGN_LEFT_BOTTOM
css::uno::Sequence< css::uno::Any > tAnySequence
OOO_DLLPUBLIC_CHARTTOOLS css::drawing::PointSequenceSequence PolyToPointSequence(const css::drawing::PolyPolygonShape3D &rPolyPolygon)
PolyPolygonShape3D -> drawing::PointSequenceSequence (2D)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
sal_Int32 getFieldType(guint nCol)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
RegError REGISTRY_CALLTYPE setValue(RegKeyHandle hKey, rtl_uString *keyName, RegValueType valueType, RegValue pData, sal_uInt32 valueSize)
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_COLUMN
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_PIE
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_SCATTER
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_BAR
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_AREA
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_LINE
constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_NET
This structure contains the explicit values for a scale like Minimum and Maximum.
void initFromPropertySet(const css::uno::Reference< css::beans::XPropertySet > &xProp)
rtl::Reference< ::chart::FormattedString > xLabel
The descriptive text for a legend entry.
rtl::Reference< SvxShapeGroup > xSymbol
The legend symbol that represents a data series or other information contained in the legend.
rtl::Reference< SvxShapeGroup > xSymbol
The legend symbol that represents a data series or other information contained in the legend.
constexpr OUStringLiteral CHART_UNONAME_NUMFMT
constexpr OUStringLiteral CHART_UNONAME_CUSTOM_LABEL_FIELDS