diff options
author | Tero Ahola <tero.ahola@digia.com> | 2012-08-31 13:22:50 +0300 |
---|---|---|
committer | Tero Ahola <tero.ahola@digia.com> | 2012-08-31 13:22:50 +0300 |
commit | 0db37e179fcd315b4e5d038b7b606c0f13471088 (patch) | |
tree | 61dc0997c03a1333c9c95ad4ce6967b7c6974021 /plugins/declarative/declarativechart.cpp | |
parent | 6a089ea6fc66056de7b8ab9f8de4662a8ea9b376 (diff) |
Added ChartView.plotArea to QML API
Diffstat (limited to 'plugins/declarative/declarativechart.cpp')
-rw-r--r-- | plugins/declarative/declarativechart.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/plugins/declarative/declarativechart.cpp b/plugins/declarative/declarativechart.cpp index 938a966b..09199f23 100644 --- a/plugins/declarative/declarativechart.cpp +++ b/plugins/declarative/declarativechart.cpp @@ -138,7 +138,18 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE /*! \qmlproperty Margins ChartView::minimumMargins - The minimum margins allowed between the outer bounds and the plotArea of the ChartView. + The minimum margins allowed between the outer bounds and the plotArea of the ChartView. Margins + area of ChartView is used for drawing title, axes and legend. Please note that setting the + properties of minimumMargins may be bigger than the defined value, depending on other ChartView + properties that affect it's layout. If you need to know the actual plotting area used at any + given time, you can check ChartView::plotArea instead. +*/ + +/*! + \qmlproperty rect ChartView::plotArea + The area on the ChartView that is used for drawing series. This is the ChartView rect without the + margins. + \sa ChartView::minimumMargins */ /*! @@ -236,6 +247,7 @@ DeclarativeChart::DeclarativeChart(QDeclarativeItem *parent) void DeclarativeChart::changeMinimumMargins(int top, int bottom, int left, int right) { m_chart->setMinimumMargins(QMargins(left, top, right, bottom)); + plotAreaChanged(m_chart->plotArea()); } DeclarativeChart::~DeclarativeChart() |