LibreOffice Module chart2 (master) 1
SeriesPlotterContainer.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#include <config_feature_desktop.h>
21#include <VSeriesPlotter.hxx>
23#include "AxisUsage.hxx"
24
25namespace chart
26{
32{
33public:
34 explicit SeriesPlotterContainer(std::vector<std::unique_ptr<VCoordinateSystem>>& rVCooSysList);
36
58 void initializeCooSysAndSeriesPlotter(ChartModel& rModel);
59
66 void initAxisUsageList(const Date& rNullDate);
67
92 void doAutoScaling(ChartModel& rModel);
93
99
105
107 css::drawing::Direction3D getPreferredAspectRatio();
108
109 std::vector<std::unique_ptr<VSeriesPlotter>>& getSeriesPlotterList()
110 {
112 }
113 std::vector<std::unique_ptr<VCoordinateSystem>>& getCooSysList() { return m_rVCooSysList; }
114 std::vector<LegendEntryProvider*> getLegendEntryProviderList();
115
116 void AdaptScaleOfYAxisWithoutAttachedSeries(ChartModel& rModel);
117
118 bool isCategoryPositionShifted(const css::chart2::ScaleData& rSourceScale,
119 bool bHasComplexCategories);
120
121 static VCoordinateSystem*
122 getCooSysForPlotter(const std::vector<std::unique_ptr<VCoordinateSystem>>& rVCooSysList,
123 MinimumAndMaximumSupplier* pMinimumAndMaximumSupplier);
124 static VCoordinateSystem*
125 addCooSysToList(std::vector<std::unique_ptr<VCoordinateSystem>>& rVCooSysList,
126 const rtl::Reference<BaseCoordinateSystem>& xCooSys, ChartModel& rChartModel);
127 static VCoordinateSystem*
128 findInCooSysList(const std::vector<std::unique_ptr<VCoordinateSystem>>& rVCooSysList,
130
131private:
134 std::vector<std::unique_ptr<VSeriesPlotter>> m_aSeriesPlotterList;
135
138 std::vector<std::unique_ptr<VCoordinateSystem>>& m_rVCooSysList;
139
143 std::map<rtl::Reference<Axis>, AxisUsage> m_aAxisUsageList;
144
152
156};
157
158} //end chart2 namespace
159
160/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class handles a collection of coordinate systems and is used for executing some action on all co...
Definition: AxisUsage.hxx:46
This class is a container of SeriesPlotter objects (such as PieChart instances).
std::map< rtl::Reference< Axis >, AxisUsage > m_aAxisUsageList
A map whose key is a XAxis interface and the related value is an object of AxisUsage type.
std::vector< std::unique_ptr< VSeriesPlotter > > & getSeriesPlotterList()
std::vector< std::unique_ptr< VCoordinateSystem > > & m_rVCooSysList
A vector of coordinate systems.
static VCoordinateSystem * getCooSysForPlotter(const std::vector< std::unique_ptr< VCoordinateSystem > > &rVCooSysList, MinimumAndMaximumSupplier *pMinimumAndMaximumSupplier)
css::drawing::Direction3D getPreferredAspectRatio()
bool isCategoryPositionShifted(const css::chart2::ScaleData &rSourceScale, bool bHasComplexCategories)
std::vector< LegendEntryProvider * > getLegendEntryProviderList()
std::vector< std::unique_ptr< VCoordinateSystem > > & getCooSysList()
static VCoordinateSystem * addCooSysToList(std::vector< std::unique_ptr< VCoordinateSystem > > &rVCooSysList, const rtl::Reference< BaseCoordinateSystem > &xCooSys, ChartModel &rChartModel)
void initAxisUsageList(const Date &rNullDate)
This method is invoked by ChartView::impl_createDiagramAndContent.
void AdaptScaleOfYAxisWithoutAttachedSeries(ChartModel &rModel)
sal_Int32 m_nMaxAxisIndex
Max axis index of all dimensions.
static VCoordinateSystem * findInCooSysList(const std::vector< std::unique_ptr< VCoordinateSystem > > &rVCooSysList, const rtl::Reference< BaseCoordinateSystem > &xCooSys)
void doAutoScaling(ChartModel &rModel)
Perform automatic axis scaling and determine the amount and spacing of increments.
void initializeCooSysAndSeriesPlotter(ChartModel &rModel)
It is used to set coordinate systems (m_rVCooSysList), this method is invoked by ChartView::createSha...
void updateScalesAndIncrementsOnAxes()
After auto-scaling is performed, call this method to set the explicit scaling and increment data to a...
void setScalesFromCooSysToPlotter()
After auto-scaling is performed, call this method to set the explicit scaling data to all the plotter...
std::vector< std::unique_ptr< VSeriesPlotter > > m_aSeriesPlotterList
A vector of series plotters.
SeriesPlotterContainer(std::vector< std::unique_ptr< VCoordinateSystem > > &rVCooSysList)