LibreOffice Module chart2 (master) 1
AreaChart.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <memory>
23#include <VSeriesPlotter.hxx>
24#include <com/sun/star/chart2/CurveStyle.hpp>
25
26namespace chart
27{
28
30{
31 // public methods
32public:
33 AreaChart() = delete;
34
36 , sal_Int32 nDimensionCount
37 , bool bCategoryXAxis, bool bNoArea=false
38 );
39 virtual ~AreaChart() override;
40
41 virtual void createShapes() override;
42 virtual void addSeries( std::unique_ptr<VDataSeries> pSeries, sal_Int32 zSlot, sal_Int32 xSlot, sal_Int32 ySlot ) override;
43
44 virtual css::drawing::Direction3D getPreferredDiagramAspectRatio() const override;
45
46 // MinimumAndMaximumSupplier
47 virtual bool isSeparateStackingForDifferentSigns( sal_Int32 nDimensionIndex ) override;
48
49 virtual LegendSymbolStyle getLegendSymbolStyle() override;
50 virtual css::uno::Any getExplicitSymbol( const VDataSeries& rSeries, sal_Int32 nPointIndex/*-1 for series symbol*/ ) override;
51
52private: //methods
54 bool impl_createArea( VDataSeries* pSeries
55 , std::vector<std::vector<css::drawing::Position3D>> const * pSeriesPoly
56 , std::vector<std::vector<css::drawing::Position3D>> const * pPreviousSeriesPoly
57 , PlottingPositionHelper const * pPosHelper );
58 bool impl_createLine( VDataSeries* pSeries
59 , std::vector<std::vector<css::drawing::Position3D>> const * pSeriesPoly
60 , PlottingPositionHelper* pPosHelper );
61 static bool create_stepped_line( std::vector<std::vector<css::drawing::Position3D>> aStartPoly
62 , css::chart2::CurveStyle eCurveStyle
63 , PlottingPositionHelper const * pPosHelper
64 , std::vector<std::vector<css::drawing::Position3D>> &aPoly );
65
66private: //member
67 std::unique_ptr<PlottingPositionHelper>
69
70 bool m_bArea;//false -> line or symbol only
71 bool m_bLine;
73
74 //Properties for splines:
75 css::chart2::CurveStyle m_eCurveStyle;
77 sal_Int32 m_nSplineOrder;
78
83};
84} //namespace chart
85
86/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::drawing::Direction3D getPreferredDiagramAspectRatio() const override
a value <= 0 for a directions means that this direction can be stretched arbitrary
Definition: AreaChart.cxx:121
rtl::Reference< SvxShapeGroupAnyD > m_xTextTarget
Definition: AreaChart.hxx:81
virtual void createShapes() override
Definition: AreaChart.cxx:564
rtl::Reference< SvxShapeGroupAnyD > m_xRegressionCurveEquationTarget
Definition: AreaChart.hxx:82
virtual css::uno::Any getExplicitSymbol(const VDataSeries &rSeries, sal_Int32 nPointIndex) override
Definition: AreaChart.cxx:108
rtl::Reference< SvxShapeGroupAnyD > m_xErrorBarTarget
Definition: AreaChart.hxx:80
virtual void addSeries(std::unique_ptr< VDataSeries > pSeries, sal_Int32 zSlot, sal_Int32 xSlot, sal_Int32 ySlot) override
A new series can be positioned relative to other series in a chart.
Definition: AreaChart.cxx:138
AreaChart()=delete
css::chart2::CurveStyle m_eCurveStyle
Definition: AreaChart.hxx:75
sal_Int32 m_nSplineOrder
Definition: AreaChart.hxx:77
bool impl_createLine(VDataSeries *pSeries, std::vector< std::vector< css::drawing::Position3D > > const *pSeriesPoly, PlottingPositionHelper *pPosHelper)
Definition: AreaChart.cxx:325
rtl::Reference< SvxShapeGroupAnyD > m_xSeriesTarget
Definition: AreaChart.hxx:79
static bool create_stepped_line(std::vector< std::vector< css::drawing::Position3D > > aStartPoly, css::chart2::CurveStyle eCurveStyle, PlottingPositionHelper const *pPosHelper, std::vector< std::vector< css::drawing::Position3D > > &aPoly)
Definition: AreaChart.cxx:212
virtual bool isSeparateStackingForDifferentSigns(sal_Int32 nDimensionIndex) override
Definition: AreaChart.cxx:95
sal_Int32 m_nCurveResolution
Definition: AreaChart.hxx:76
std::unique_ptr< PlottingPositionHelper > m_pMainPosHelper
Definition: AreaChart.hxx:68
AreaChart(const rtl::Reference< ::chart::ChartType > &xChartTypeModel, sal_Int32 nDimensionCount, bool bCategoryXAxis, bool bNoArea=false)
void impl_createSeriesShapes()
Definition: AreaChart.cxx:478
bool impl_createArea(VDataSeries *pSeries, std::vector< std::vector< css::drawing::Position3D > > const *pSeriesPoly, std::vector< std::vector< css::drawing::Position3D > > const *pPreviousSeriesPoly, PlottingPositionHelper const *pPosHelper)
Definition: AreaChart.cxx:403
virtual LegendSymbolStyle getLegendSymbolStyle() override
Definition: AreaChart.cxx:101
virtual ~AreaChart() override
Definition: AreaChart.cxx:91