diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-10-15 11:48:57 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-11-19 13:47:36 +0100 |
commit | 0574f59c6ab46c5a5c077ce5c63a0e2dedf865f1 (patch) | |
tree | 35f526b5863e183ced0c769dce4646bdf72a6c7d /chart2/inc | |
parent | 401f01caf5b357ac6c15b37a89c0a9aaeb46f4e4 (diff) |
add methods to render whole data series at once
additionally we have now a method for timebased data series in the shape
factory. The method contains the two points in time and the rendering
backend should calculate intermitiate points for a good interpolation.
Change-Id: Id30e2039ec90a6c36e947b7a7f9bca65ef0e8961
Diffstat (limited to 'chart2/inc')
-rw-r--r-- | chart2/inc/DataSeriesState.hxx | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/chart2/inc/DataSeriesState.hxx b/chart2/inc/DataSeriesState.hxx new file mode 100644 index 000000000000..bfe14c98f809 --- /dev/null +++ b/chart2/inc/DataSeriesState.hxx @@ -0,0 +1,71 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef DATASERIES_HXX +#define DATASERIES_HXX + +#include <rtl/ustring.hxx> +#include <mdds/multi_type_vector.hpp> +#include <mdds/multi_type_vector_trait.hpp> +#include <vector> +#include <map> + +#include <com/sun/star/uno/Any.h> + +namespace chart { + +class DataSeries +{ +public: + typedef mdds::multi_type_vector<mdds::mtv::element_block_func> DataSeriesType; + + DataSeriesType getDataSeries(); + + size_t size(); + double getValue(size_t nIndex); + +private: + OUString maLabel; + DataSeriesType maDataSeries; + +}; + +/** + * point properties overwrite series properties + */ +struct DataSeriesProperties +{ + typedef std::map< OUString, com::sun::star::uno::Any > PropertyMap; + PropertyMap aSeriesProps; + std::vector< PropertyMap > aPointProps; +}; + +struct Axis +{ + double nMin; + double nMax; + bool bLog; + bool bInverseDirection; +}; + +struct DataSeriesState +{ + DataSeries aXValue; + DataSeries aYValue; + DataSeriesProperties aProperties; + std::map<OUString, DataSeries> aMapProperties; + Axis aXAxis; + Axis aYAxis; +}; + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |