LibreOffice Module chart2 (master) 1
|
#include <VCartesianAxis.hxx>
Classes | |
struct | ScreenPosAndLogicPos |
Public Member Functions | |
VCartesianAxis (const AxisProperties &rAxisProperties, const css::uno::Reference< css::util::XNumberFormatsSupplier > &xNumberFormatsSupplier, sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount, PlottingPositionHelper *pPosHelper=nullptr) | |
virtual | ~VCartesianAxis () override |
virtual void | createMaximumLabels () override |
virtual void | createLabels () override |
virtual void | updatePositions () override |
virtual void | createShapes () override |
virtual sal_Int32 | estimateMaximumAutoMainIncrementCount () override |
virtual void | createAllTickInfos (TickInfoArraysType &rAllTickInfos) override |
void | createAllTickInfosFromComplexCategories (TickInfoArraysType &rAllTickInfos, bool bShiftedPosition) |
TickIter * | createLabelTickIterator (sal_Int32 nTextLevel) |
TickIter * | createMaximumLabelTickIterator (sal_Int32 nTextLevel) |
sal_Int32 | getTextLevelCount () const |
virtual TickFactory * | createTickFactory () override |
double | getAxisIntersectionValue () const |
Get the value at which the other axis crosses. More... | |
double | getLabelLineIntersectionValue () const |
Get the value at which label line crosses the other axis. More... | |
double | getExtraLineIntersectionValue () const |
Get the value at which extra line crosses the other axis. More... | |
void | get2DAxisMainLine (basegfx::B2DVector &rStart, basegfx::B2DVector &rEnd, AxisLabelAlignment &rLabelAlignment, double fCrossesOtherAxis) const |
void | createDataTableView (std::vector< std::unique_ptr< VSeriesPlotter > > &rSeriesPlotterList, css::uno::Reference< css::util::XNumberFormatsSupplier > const &xNumberFormatsSupplier, rtl::Reference<::chart::ChartModel > const &xChartDoc, css::uno::Reference< css::uno::XComponentContext > const &rComponentContext) override |
![]() | |
VAxisBase (sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount, const AxisProperties &rAxisProperties, const css::uno::Reference< css::util::XNumberFormatsSupplier > &xNumberFormatsSupplier) | |
virtual | ~VAxisBase () override |
sal_Int32 | getDimensionCount () const |
Return the number of dimensions the diagram has. More... | |
virtual void | createMaximumLabels ()=0 |
virtual void | createLabels ()=0 |
virtual void | updatePositions ()=0 |
virtual bool | isAnythingToDraw () |
virtual void | initAxisLabelProperties (const css::awt::Size &rFontReferenceSize, const css::awt::Rectangle &rMaximumSpaceForLabels) |
virtual void | setExplicitScaleAndIncrement (const ExplicitScaleData &rScale, const ExplicitIncrementData &rIncrement) override |
virtual sal_Int32 | estimateMaximumAutoMainIncrementCount () |
virtual void | createAllTickInfos (TickInfoArraysType &rAllTickInfos) |
void | setExtraLinePositionAtOtherAxis (double fCrossingAt) |
virtual void | createDataTableView (std::vector< std::unique_ptr< VSeriesPlotter > > &rSeriesPlotterList, css::uno::Reference< css::util::XNumberFormatsSupplier > const &xNumberFormatsSupplier, rtl::Reference<::chart::ChartModel > const &xChartDoc, css::uno::Reference< css::uno::XComponentContext > const &rComponentContext) |
std::shared_ptr< DataTableView > | getDataTableView () |
![]() | |
VAxisOrGridBase (sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount) | |
virtual | ~VAxisOrGridBase () override |
virtual void | setTransformationSceneToScreen (const css::drawing::HomogenMatrix &rMatrix) override |
virtual void | setExplicitScaleAndIncrement (const ExplicitScaleData &rScale, const ExplicitIncrementData &rIncrement) |
void | set3DWallPositions (CuboidPlanePosition eLeftWallPos, CuboidPlanePosition eBackWallPos, CuboidPlanePosition eBottomPos) |
virtual TickFactory * | createTickFactory () |
![]() | |
PlotterBase (sal_Int32 nDimension) | |
virtual | ~PlotterBase () |
virtual void | initPlotter (const rtl::Reference< SvxShapeGroupAnyD > &xLogicTarget, const rtl::Reference< SvxShapeGroupAnyD > &xFinalTarget, const OUString &rCID) |
virtual void | setScales (std::vector< ExplicitScaleData > &&rScales, bool bSwapXAndYAxis) |
virtual void | setTransformationSceneToScreen (const css::drawing::HomogenMatrix &rMatrix) |
virtual void | createShapes ()=0 |
Private Member Functions | |
bool | createTextShapes (const rtl::Reference< SvxShapeGroupAnyD > &xTarget, TickIter &rTickIter, AxisLabelProperties &rAxisLabelProperties, TickFactory2D const *pTickFactory, sal_Int32 nScreenDistanceBetweenTicks) |
Go through all tick label positions and decide which labels to display based on the text shape geometry, overlap setting, tick interval, auto-stagger setting etc. More... | |
bool | createTextShapesSimple (const rtl::Reference< SvxShapeGroupAnyD > &xTarget, TickIter &rTickIter, AxisLabelProperties &rAxisLabelProperties, TickFactory2D const *pTickFactory) |
Variant of createTextShapes where none of auto-staggering and link-breaking are allowed in case of overlaps. More... | |
void | createTickMarkLineShapes (TickInfoArrayType &rTickInfos, const TickmarkProperties &rTickmarkProperties, TickFactory2D const &rTickFactory2D, bool bOnlyAtLabels) |
TickFactory2D * | createTickFactory2D () |
void | hideIdenticalScreenValues (TickInfoArraysType &rTickInfos) const |
void | doStaggeringOfLabels (const AxisLabelProperties &rAxisLabelProperties, TickFactory2D const *pTickFactory2D) |
Shift the screen positions of the tick labels according to the stagger settings. More... | |
bool | isBreakOfLabelsAllowed (const AxisLabelProperties &rAxisLabelProperties, bool bIsHorizontalAxis, bool bIsVerticalAxis) const |
::basegfx::B2DVector | getScreenPosition (double fLogicX, double fLogicY, double fLogicZ) const |
ScreenPosAndLogicPos | getScreenPosAndLogicPos (double fLogicX, double fLogicY, double fLogicZ) const |
void | createDataTableShape (std::unique_ptr< TickFactory2D > const &rTickFactory2D) |
Definition at line 26 of file VCartesianAxis.hxx.
chart::VCartesianAxis::VCartesianAxis | ( | const AxisProperties & | rAxisProperties, |
const css::uno::Reference< css::util::XNumberFormatsSupplier > & | xNumberFormatsSupplier, | ||
sal_Int32 | nDimensionIndex, | ||
sal_Int32 | nDimensionCount, | ||
PlottingPositionHelper * | pPosHelper = nullptr |
||
) |
Definition at line 63 of file VCartesianAxis.cxx.
References chart::PlotterBase::m_pPosHelper.
|
overridevirtual |
Definition at line 75 of file VCartesianAxis.cxx.
References chart::PlotterBase::m_pPosHelper.
|
overridevirtual |
Reimplemented from chart::VAxisBase.
Definition at line 659 of file VCartesianAxis.cxx.
void chart::VCartesianAxis::createAllTickInfosFromComplexCategories | ( | TickInfoArraysType & | rAllTickInfos, |
bool | bShiftedPosition | ||
) |
Definition at line 573 of file VCartesianAxis.cxx.
References chart::TickInfo::aText, chart::TickInfo::fScaledTickValue, nCount, and chart::TickInfo::nFactorForLimitedTextWidth.
|
private |
Definition at line 1667 of file VCartesianAxis.cxx.
|
overridevirtual |
Reimplemented from chart::VAxisBase.
Definition at line 2012 of file VCartesianAxis.cxx.
|
overridevirtual |
Implements chart::VAxisBase.
Definition at line 1696 of file VCartesianAxis.cxx.
References chart::AxisLabelProperties::m_bLineBreakAllowed, chart::AxisLabelProperties::m_bOverlapAllowed, chart::AxisLabelProperties::m_fRotationAngleDegree, chart::TickFactory2D::updateScreenValues(), x, and y.
TickIter * chart::VCartesianAxis::createLabelTickIterator | ( | sal_Int32 | nTextLevel | ) |
Definition at line 667 of file VCartesianAxis.cxx.
References o3tl::make_unsigned().
|
overridevirtual |
Implements chart::VAxisBase.
Definition at line 1765 of file VCartesianAxis.cxx.
References chart::TickFactory2D::isHorizontalAxis(), chart::TickFactory2D::isVerticalAxis(), chart::AxisLabelProperties::m_bLineBreakAllowed, chart::AxisLabelProperties::m_bOverlapAllowed, chart::AxisLabelProperties::m_eStaggering, and chart::TickFactory2D::updateScreenValues().
TickIter * chart::VCartesianAxis::createMaximumLabelTickIterator | ( | sal_Int32 | nTextLevel | ) |
Definition at line 674 of file VCartesianAxis.cxx.
References size.
|
overridevirtual |
Implements chart::PlotterBase.
Definition at line 1898 of file VCartesianAxis.cxx.
References chart::TickFactory::getAllTicks(), chart::TickFactory2D::getDistanceAxisTickToText(), basegfx::B2DVector::getLength(), chart::lcl_getLabelsDistance(), chart::ShapeFactory::setShapeName(), and chart::TickFactory2D::updateScreenValues().
Referenced by chart::VPolarRadiusAxis::createShapes().
|
private |
Go through all tick label positions and decide which labels to display based on the text shape geometry, overlap setting, tick interval, auto-stagger setting etc.
When the auto-stagger setting is on, try to avoid overlaps by staggering labels or set the labels at an angle. This method may change the axis label properties especially when the auto staggering is performed. But the screen label positions will not be shifted in this method; it will be done in the doStaggeringOfLabels method.
Definition at line 705 of file VCartesianAxis.cxx.
References aLabel, aPropNames, chart::AxisLabelProperties::autoRotate45(), COL_AUTO(), chart::createSingleLabel(), chart::doesOverlap(), chart::TickIter::firstInfo(), chart::getAxisLabelProperties(), chart::TickFactory2D::getDistanceAxisTickToText(), chart::getTextLabelString(), basegfx::Tuple2D< typename TYPE >::getX(), chart::TickFactory2D::getXaxisEndPos(), chart::TickFactory2D::getXaxisStartPos(), basegfx::Tuple2D< typename TYPE >::getY(), chart::TickFactory2D::isHorizontalAxis(), chart::AxisLabelProperties::isStaggered(), chart::TickFactory2D::isVerticalAxis(), chart::lcl_doesShapeOverlapWithTickmark(), chart::lcl_hasWordBreak(), chart::AxisLabelProperties::m_aFontReferenceSize, chart::AxisLabelProperties::m_aMaximumSpaceForLabels, chart::AxisLabelProperties::m_bLineBreakAllowed, chart::AxisLabelProperties::m_bOverlapAllowed, chart::AxisLabelProperties::m_eStaggering, chart::AxisLabelProperties::m_fRotationAngleDegree, chart::AxisLabelProperties::m_nNumberFormatKey, chart::AxisLabelProperties::m_nRhythm, chart::TickIter::nextInfo(), chart::removeShapesAtWrongRhythm(), u, xTarget, and chart::TickInfo::xTextShape.
|
private |
Variant of createTextShapes where none of auto-staggering and link-breaking are allowed in case of overlaps.
Overlaps of text shapes are to be resolved only by adjusting the label tick interval.
Definition at line 966 of file VCartesianAxis.cxx.
References aLabel, aPropNames, chart::AxisLabelProperties::autoRotate45(), COL_AUTO(), chart::createSingleLabel(), chart::doesOverlap(), chart::TickIter::firstInfo(), chart::getAxisLabelProperties(), chart::TickFactory2D::getDistanceAxisTickToText(), chart::getTextLabelString(), chart::TickFactory2D::isHorizontalAxis(), chart::TickFactory2D::isVerticalAxis(), chart::lcl_doesShapeOverlapWithTickmark(), chart::AxisLabelProperties::m_bOverlapAllowed, chart::AxisLabelProperties::m_fRotationAngleDegree, chart::AxisLabelProperties::m_nNumberFormatKey, chart::AxisLabelProperties::m_nRhythm, chart::TickIter::nextInfo(), chart::removeShapesAtWrongRhythm(), u, xTarget, and chart::TickInfo::xTextShape.
|
overridevirtual |
Reimplemented from chart::VAxisOrGridBase.
Definition at line 1510 of file VCartesianAxis.cxx.
|
private |
Definition at line 1515 of file VCartesianAxis.cxx.
|
private |
Definition at line 1869 of file VCartesianAxis.cxx.
References chart::TickFactory2D::addPointSequenceForTickLine(), and chart::TickmarkProperties::aLineProperties.
|
private |
Shift the screen positions of the tick labels according to the stagger settings.
Final stagger setting is decided during the createTextShapes call, but this method does the physical shifting of the label positions based on the final stagger setting.
Definition at line 1623 of file VCartesianAxis.cxx.
References chart::TickFactory2D::getDistanceAxisTickToText(), chart::AxisLabelProperties::isStaggered(), chart::lcl_getLabelsDistance(), chart::lcl_shiftLabels(), and chart::AxisLabelProperties::m_eStaggering.
|
overridevirtual |
Reimplemented from chart::VAxisBase.
Definition at line 1561 of file VCartesianAxis.cxx.
References COL_AUTO(), chart::FixedNumberFormatter::getFormattedString(), and m_nDimensionIndex.
void chart::VCartesianAxis::get2DAxisMainLine | ( | basegfx::B2DVector & | rStart, |
basegfx::B2DVector & | rEnd, | ||
AxisLabelAlignment & | rLabelAlignment, | ||
double | fCrossesOtherAxis | ||
) | const |
Definition at line 1197 of file VCartesianAxis.cxx.
References chart::VCartesianAxis::ScreenPosAndLogicPos::aScreenPos, chart::CuboidPlanePosition_Back, chart::CuboidPlanePosition_Bottom, chart::CuboidPlanePosition_Left, chart::VCartesianAxis::ScreenPosAndLogicPos::fLogicX, chart::VCartesianAxis::ScreenPosAndLogicPos::fLogicY, chart::VCartesianAxis::ScreenPosAndLogicPos::fLogicZ, basegfx::Tuple2D< typename TYPE >::getX(), basegfx::Tuple2D< typename TYPE >::getY(), chart::LABEL_ALIGN_BOTTOM, chart::LABEL_ALIGN_LEFT, chart::LABEL_ALIGN_RIGHT, chart::LABEL_ALIGN_TOP, m_nDimensionIndex, chart::AxisLabelAlignment::meAlignment, chart::AxisLabelAlignment::mfInnerTickDirection, and chart::AxisLabelAlignment::mfLabelDirection.
double chart::VCartesianAxis::getAxisIntersectionValue | ( | ) | const |
Get the value at which the other axis crosses.
Definition at line 1094 of file VCartesianAxis.cxx.
References m_nDimensionIndex.
double chart::VCartesianAxis::getExtraLineIntersectionValue | ( | ) | const |
Get the value at which extra line crosses the other axis.
Definition at line 1116 of file VCartesianAxis.cxx.
References m_nDimensionIndex.
double chart::VCartesianAxis::getLabelLineIntersectionValue | ( | ) | const |
Get the value at which label line crosses the other axis.
Definition at line 1105 of file VCartesianAxis.cxx.
References m_nDimensionIndex.
|
private |
|
private |
Definition at line 1131 of file VCartesianAxis.cxx.
sal_Int32 chart::VCartesianAxis::getTextLevelCount | ( | ) | const |
Definition at line 697 of file VCartesianAxis.cxx.
|
private |
Definition at line 1543 of file VCartesianAxis.cxx.
References chart::lcl_hideIdenticalScreenValues(), and nCount.
|
private |
Definition at line 515 of file VCartesianAxis.cxx.
References chart::AxisLabelProperties::m_bLineBreakAllowed, chart::AxisLabelProperties::m_bStackCharacters, and chart::AxisLabelProperties::m_fRotationAngleDegree.
|
overridevirtual |
Implements chart::VAxisBase.
Definition at line 1807 of file VCartesianAxis.cxx.
References basegfx::deg2rad(), chart::TickFactory2D::getDistanceAxisTickToText(), chart::TickFactory2D::isHorizontalAxis(), TOOLS_WARN_EXCEPTION, and chart::TickFactory2D::updateScreenValues().