1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
23 #include <VSeriesPlotter.hxx>
24 #include <com/sun/star/chart2/CurveStyle.hpp>
29 class AreaChart
: public VSeriesPlotter
35 AreaChart( const css::uno::Reference
< css::chart2::XChartType
>& xChartTypeModel
36 , sal_Int32 nDimensionCount
37 , bool bCategoryXAxis
, bool bNoArea
=false
39 virtual ~AreaChart() override
;
41 virtual void createShapes() override
;
42 virtual void addSeries( std::unique_ptr
<VDataSeries
> pSeries
, sal_Int32 zSlot
, sal_Int32 xSlot
, sal_Int32 ySlot
) override
;
44 virtual css::drawing::Direction3D
getPreferredDiagramAspectRatio() const override
;
46 // MinimumAndMaximumSupplier
47 virtual bool isSeparateStackingForDifferentSigns( sal_Int32 nDimensionIndex
) override
;
49 virtual LegendSymbolStyle
getLegendSymbolStyle() override
;
50 virtual css::uno::Any
getExplicitSymbol( const VDataSeries
& rSeries
, sal_Int32 nPointIndex
/*-1 for series symbol*/ ) override
;
53 void impl_createSeriesShapes();
54 bool impl_createArea( VDataSeries
* pSeries
55 , css::drawing::PolyPolygonShape3D
const * pSeriesPoly
56 , css::drawing::PolyPolygonShape3D
const * pPreviousSeriesPoly
57 , PlottingPositionHelper
const * pPosHelper
);
58 bool impl_createLine( VDataSeries
* pSeries
59 , css::drawing::PolyPolygonShape3D
const * pSeriesPoly
60 , PlottingPositionHelper
* pPosHelper
);
61 static bool create_stepped_line( css::drawing::PolyPolygonShape3D aStartPoly
62 , css::chart2::CurveStyle eCurveStyle
63 , PlottingPositionHelper
const * pPosHelper
64 , css::drawing::PolyPolygonShape3D
&aPoly
);
67 std::unique_ptr
<PlottingPositionHelper
>
70 bool m_bArea
;//false -> line or symbol only
74 //Properties for splines:
75 css::chart2::CurveStyle m_eCurveStyle
;
76 sal_Int32 m_nCurveResolution
;
77 sal_Int32 m_nSplineOrder
;
79 css::uno::Reference
< css::drawing::XShapes
> m_xSeriesTarget
;
80 css::uno::Reference
< css::drawing::XShapes
> m_xErrorBarTarget
;
81 css::uno::Reference
< css::drawing::XShapes
> m_xTextTarget
;
82 css::uno::Reference
< css::drawing::XShapes
> m_xRegressionCurveEquationTarget
;
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */