Review Request: Improvements in saving pie/ring charts

Brijesh Patel brijesh3105 at gmail.com
Wed Mar 14 11:22:49 GMT 2012



> On March 14, 2012, 8:15 a.m., Sebastian Sauer wrote:
> > plugins/chartshape/DataSet.cpp, line 698
> > <http://git.reviewboard.kde.org/r/104268/diff/1/?file=53071#file53071line698>
> >
> >     1. That code is never reached when (modelDataDirection == Qt::Horizontal)
> >     
> >     2. Note that brush() uses defaultBrush() and not defaultBrush(section). That seems to make a huge difference cause defaultBrush() uses
> >     
> >         if ( kdChartModel->dataDirection() == Qt::Vertical )
> >             return defaultDataSetColor( num );
> >         // FIXME: What to return in the other case?
> >         return QBrush();
> >     
> >     whereas defaultBrush(section) uses
> >     
> >         if ( kdChartModel->dataDirection() == Qt::Horizontal )
> >             return defaultDataSetColor( section );
> >         // Vertically aligned diagrams default to one brush per data set
> >         return defaultBrush();
> >     
> >     Better don't ask why the one uses Vertical and the other Horizontal cause I have no clue either... Probably yet another bug?
> >

If the data direction is horizontal,each slice of the pie chart should have a different brush which is handled by brush( int section ) which in some cases will call defaultBrush(section)
and when the data direction is vertical, each dataset will have only one brush, so only calling brush() will handle that case which in some cases will call defaultBrush()
So i've considered both the cases...


- Brijesh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104268/#review11389
-----------------------------------------------------------


On March 14, 2012, 6:53 a.m., Brijesh Patel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104268/
> -----------------------------------------------------------
> 
> (Updated March 14, 2012, 6:53 a.m.)
> 
> 
> Review request for Calligra, Inge Wallin and Sebastian Sauer.
> 
> 
> Description
> -------
> 
> FIX : Changing chart type from pie/ring chart to bar chart or vice versa ,doesn't works as expected
> 
> i) checks whether the dataDirection is vertical or horizontal and then returns the brush 
>       - This fixes changing chart type from bar chart to pie/ring chart
> 
> ii) ensures that axis are saved no matter what be the chart type
>       - This fixes changing chart type from pie/ring chart to bar chart
> 
> 
> Diffs
> -----
> 
>   plugins/chartshape/DataSet.cpp 1ac5de3 
>   plugins/chartshape/PlotArea.cpp 8f2a9db 
> 
> Diff: http://git.reviewboard.kde.org/r/104268/diff/
> 
> 
> Testing
> -------
> 
> Tested using cstester on some test documents
> 
> 
> Thanks,
> 
> Brijesh Patel
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120314/1fa60ab8/attachment.htm>


More information about the calligra-devel mailing list