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 .
20 #ifndef INCLUDED_CHART2_SOURCE_VIEW_CHARTTYPES_AREACHART_HXX
21 #define INCLUDED_CHART2_SOURCE_VIEW_CHARTTYPES_AREACHART_HXX
24 #include <VSeriesPlotter.hxx>
25 #include <com/sun/star/chart2/CurveStyle.hpp>
30 class AreaChart
: public VSeriesPlotter
36 AreaChart( const css::uno::Reference
< css::chart2::XChartType
>& xChartTypeModel
37 , sal_Int32 nDimensionCount
38 , bool bCategoryXAxis
, bool bNoArea
=false
40 virtual ~AreaChart() override
;
42 virtual void createShapes() override
;
43 virtual void addSeries( std::unique_ptr
<VDataSeries
> pSeries
, sal_Int32 zSlot
, sal_Int32 xSlot
, sal_Int32 ySlot
) override
;
45 virtual css::drawing::Direction3D
getPreferredDiagramAspectRatio() const override
;
47 // MinimumAndMaximumSupplier
48 virtual bool isSeparateStackingForDifferentSigns( sal_Int32 nDimensionIndex
) override
;
50 virtual LegendSymbolStyle
getLegendSymbolStyle() override
;
51 virtual css::uno::Any
getExplicitSymbol( const VDataSeries
& rSeries
, sal_Int32 nPointIndex
/*-1 for series symbol*/ ) override
;
54 void impl_createSeriesShapes();
55 bool impl_createArea( VDataSeries
* pSeries
56 , css::drawing::PolyPolygonShape3D
const * pSeriesPoly
57 , css::drawing::PolyPolygonShape3D
const * pPreviousSeriesPoly
58 , PlottingPositionHelper
const * pPosHelper
);
59 bool impl_createLine( VDataSeries
* pSeries
60 , css::drawing::PolyPolygonShape3D
const * pSeriesPoly
61 , PlottingPositionHelper
* pPosHelper
);
62 static bool create_stepped_line( css::drawing::PolyPolygonShape3D aStartPoly
63 , css::chart2::CurveStyle eCurveStyle
64 , PlottingPositionHelper
const * pPosHelper
65 , css::drawing::PolyPolygonShape3D
&aPoly
);
68 std::unique_ptr
<PlottingPositionHelper
>
71 bool m_bArea
;//false -> line or symbol only
75 //Properties for splines:
76 css::chart2::CurveStyle m_eCurveStyle
;
77 sal_Int32 m_nCurveResolution
;
78 sal_Int32 m_nSplineOrder
;
80 css::uno::Reference
< css::drawing::XShapes
> m_xSeriesTarget
;
81 css::uno::Reference
< css::drawing::XShapes
> m_xErrorBarTarget
;
82 css::uno::Reference
< css::drawing::XShapes
> m_xTextTarget
;
83 css::uno::Reference
< css::drawing::XShapes
> m_xRegressionCurveEquationTarget
;
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */