Created attachment 59331 [details] Test data Version: git text-layoutrestructure-boemann branch (Using KDE 4.5.5) OS: Kubuntu 10.10 Test data is in ODP format which has percentage stacked bar chart in it. Open the same document in Calligra Stage and check the direction of the chart. Expected outcome: Chart should be displayed in horizontal direction. Actual outcome: Chart is displaying in vertical direction. Please check the screenshots attached. Frequency: Always.
Created attachment 59332 [details] Screenshot in Open Office
Created attachment 59333 [details] Screenshot in Calligra Stage
Values along along the Y axis are also wrong.
Created attachment 59834 [details] Test data Even for pptx files also,Bar chart is dispalying as column chart. Attaching the test data.
Created attachment 59835 [details] Screenshot in MS Office
Created attachment 59836 [details] Screenshot in Calligra Stage
Created attachment 59903 [details] Test data in ODT format Similar issue is observed for the .odt format also.Attaching the test data.
Fixed with 97a7e2dde139c450bb69fa5879effd54adf74c07
Reopen cause commit 97a7e2dde139c450bb69fa5879effd54adf74c07 didn't fully fixed the issue. Investigating alternates atm. Current state; diff --git a/plugins/chartshape/Axis.cpp b/plugins/chartshape/Axis.cpp index 5fff771..fcb7493 100644 --- a/plugins/chartshape/Axis.cpp +++ b/plugins/chartshape/Axis.cpp @@ -462,9 +462,14 @@ void Axis::Private::createBarDiagram() kdBarDiagram = new KDChart::BarDiagram( plotArea->kdChart(), kdPlane ); registerDiagram( kdBarDiagram ); + // By 'vertical', KDChart means the orientation of a chart's bars, // not the orientation of the x axis. - kdBarDiagram->setOrientation( plotArea->isVertical() ? Qt::Horizontal : Qt::Vertical ); + +//kdBarDiagram->setOrientation( plotArea->isVertical() ? Qt::Horizontal : Qt::Vertical ); +//kdBarDiagram->setOrientation( plotArea->isVertical() ? Qt::Vertical : Qt::Horizontal ); +kdBarDiagram->setOrientation( q->orientation() ); + kdBarDiagram->setPen( QPen( Qt::black, 0.0 ) ); if ( plotAreaChartSubType == StackedChartSubtype ) diff --git a/plugins/chartshape/PlotArea.cpp b/plugins/chartshape/PlotArea.cpp index 63e425b..28ae2eb 100644 --- a/plugins/chartshape/PlotArea.cpp +++ b/plugins/chartshape/PlotArea.cpp @@ -655,8 +655,10 @@ bool PlotArea::loadOdf( const KoXmlElement &plotAreaElement, // These things include chart subtype, special things for some // chart types like line charts, stock charts, etc. if ( plotAreaElement.hasAttributeNS( KoXmlNS::chart, "style-name" ) ) { + // the clear and fill is needed here as someone changes the style stack since the last time we used it + // Maybe we can move the stuff up to be at the same place to work correctly? styleStack.clear(); - //context.odfLoadingContext().fillStyleStack( plotAreaElement, KoXmlNS::chart, "style-name", "chart" ); + context.odfLoadingContext().fillStyleStack( plotAreaElement, KoXmlNS::chart, "style-name", "chart" ); styleStack.setTypeProperties( "graphic" ); styleStack.setTypeProperties( "chart" ); The change in Axis.cpp should be more or less logical correct. We probably need to take the orientation of the proxymodel into account too or could there be other reasons this doesn't work as expected? The change in PlotArea.cpp seems to have all kind of side-effects. Question here is why fillStyleStack is done if we don't save+restore?
Was fixed meanwhile.
Verified in 5992551fa6b6bf4e2d716728e086fd48ff905e33 . But still the Axies are displaying in reverse direction,It will be raised as a seperate bug.