Review Request: Improvements in saving pie/ring charts

Sebastian Sauer mail at dipe.org
Wed Mar 14 08:15:22 GMT 2012


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



plugins/chartshape/DataSet.cpp
<http://git.reviewboard.kde.org/r/104268/#comment9108>

    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?
    


- Sebastian Sauer


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/2d990d12/attachment.htm>


More information about the calligra-devel mailing list