Kaydet (Commit) 2903c5f5 authored tarafından Muthu Subramanian's avatar Muthu Subramanian

n#734735: Use full available size for pie charts.

üst 9d548d56
...@@ -1408,11 +1408,13 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& ...@@ -1408,11 +1408,13 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer&
uno::Reference< drawing::XShapes > xSeriesTargetInFrontOfAxis(0); uno::Reference< drawing::XShapes > xSeriesTargetInFrontOfAxis(0);
uno::Reference< drawing::XShapes > xSeriesTargetBehindAxis(0); uno::Reference< drawing::XShapes > xSeriesTargetBehindAxis(0);
VDiagram aVDiagram(xDiagram, aPreferredAspectRatio, nDimensionCount); VDiagram aVDiagram(xDiagram, aPreferredAspectRatio, nDimensionCount);
bool bIsPieOrDonut = lcl_IsPieOrDonut(xDiagram);
{//create diagram {//create diagram
aVDiagram.init(xDiagramPlusAxes_Shapes,xDiagramPlusAxes_Shapes,m_xShapeFactory); aVDiagram.init(xDiagramPlusAxes_Shapes,xDiagramPlusAxes_Shapes,m_xShapeFactory);
aVDiagram.createShapes(rAvailablePos,rAvailableSize); aVDiagram.createShapes(rAvailablePos,rAvailableSize);
xSeriesTargetInFrontOfAxis = aVDiagram.getCoordinateRegion(); xSeriesTargetInFrontOfAxis = aVDiagram.getCoordinateRegion();
if( !bUseFixedInnerSize ) // It is preferrable to use full size than minimum for pie charts
if( !bIsPieOrDonut && !bUseFixedInnerSize )
aVDiagram.reduceToMimimumSize(); aVDiagram.reduceToMimimumSize();
} }
...@@ -1439,7 +1441,6 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& ...@@ -1439,7 +1441,6 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer&
//use first coosys only so far; todo: calculate for more than one coosys if we have more in future //use first coosys only so far; todo: calculate for more than one coosys if we have more in future
//todo: this is just a workaround at the moment for pie and donut labels //todo: this is just a workaround at the moment for pie and donut labels
bool bIsPieOrDonut = lcl_IsPieOrDonut(xDiagram);
if( !bIsPieOrDonut && (!rVCooSysList.empty()) ) if( !bIsPieOrDonut && (!rVCooSysList.empty()) )
{ {
VCoordinateSystem* pVCooSys = rVCooSysList[0]; VCoordinateSystem* pVCooSys = rVCooSysList[0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment