summaryrefslogtreecommitdiffstats
path: root/chart2
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2012-03-11 12:08:58 +0000
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-23 02:55:28 +0100
commit68e482e9d8e29944a00fb53959f2e728e78a9782 (patch)
tree24fd2820dc36fa2d0f8e3e182599ffd85e03c4a9 /chart2
parentSet bar type as YErrorBar when creating InsertErrorBarsDialog. (diff)
downloadcore-68e482e9d8e29944a00fb53959f2e728e78a9782.tar.gz
core-68e482e9d8e29944a00fb53959f2e728e78a9782.zip
Create respective error bars in areachart when creating shapes.
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/charttypes/AreaChart.cxx25
1 files changed, 20 insertions, 5 deletions
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 8aaaf23365f8..2c2e8276522c 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -836,7 +836,7 @@ void AreaChart::createShapes()
if( !bIsVisible )
continue;
- bool bCreateErrorBar = false;
+ bool bCreateYErrorBar = false, bCreateXErrorBar = false;
{
uno::Reference< beans::XPropertySet > xErrorBarProp(pSeries->getYErrorBarProperties(nIndex));
if( xErrorBarProp.is() )
@@ -845,14 +845,25 @@ void AreaChart::createShapes()
bool bShowNegative = false;
xErrorBarProp->getPropertyValue( C2U( "ShowPositiveError" )) >>= bShowPositive;
xErrorBarProp->getPropertyValue( C2U( "ShowNegativeError" )) >>= bShowNegative;
- bCreateErrorBar = bShowPositive || bShowNegative;
+ bCreateYErrorBar = bShowPositive || bShowNegative;
+ }
+
+ xErrorBarProp = pSeries->getXErrorBarProperties(nIndex);
+ if ( xErrorBarProp.is() )
+ {
+ bool bShowPositive = false;
+ bool bShowNegative = false;
+ xErrorBarProp->getPropertyValue( C2U( "ShowPositiveError" )) >>= bShowPositive;
+ xErrorBarProp->getPropertyValue( C2U( "ShowNegativeError" )) >>= bShowNegative;
+ bCreateXErrorBar = bShowPositive || bShowNegative;
}
}
Symbol* pSymbolProperties = m_bSymbol ? (*aSeriesIter)->getSymbolProperties( nIndex ) : 0;
bool bCreateSymbol = pSymbolProperties && (pSymbolProperties->Style != SymbolStyle_NONE);
- if( !bCreateSymbol && !bCreateErrorBar && !pSeries->getDataPointLabelIfLabel(nIndex) )
+ if( !bCreateSymbol && !bCreateYErrorBar &&
+ !bCreateXErrorBar && !pSeries->getDataPointLabelIfLabel(nIndex) )
continue;
//create a group shape for this point and add to the series shape:
@@ -899,8 +910,12 @@ void AreaChart::createShapes()
}
}
}
- //create error bar
- createErrorBar_Y( aUnscaledLogicPosition, **aSeriesIter, nIndex, m_xErrorBarTarget );
+ //create error bars
+ if (bCreateXErrorBar)
+ createErrorBar_X( aUnscaledLogicPosition, **aSeriesIter, nIndex, m_xErrorBarTarget );
+
+ if (bCreateYErrorBar)
+ createErrorBar_Y( aUnscaledLogicPosition, **aSeriesIter, nIndex, m_xErrorBarTarget );
//create data point label
if( (**aSeriesIter).getDataPointLabelIfLabel(nIndex) )