[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: koffice/plugins/chartshape/kdchart/src
From:       Johannes Simon <johannes.simon () gmail ! com>
Date:       2010-10-26 15:05:45
Message-ID: 0AAF6F3A-F576-48C1-A1CC-76655425B4F4 () gmail ! com
[Download RAW message or body]

I can't quite follow, doesn't the DataDimension::isCalculated attribute indicate that the x values are \
explicitly specified in the model ("calculated")? I guess your change has to do with a special case like \
stock charts (?), but for most other types the x values are specified in the model iif. the diagram has \
more than one data dimension.

So in case a single x/y (plotter) diagram is added to the plane does this still work as expected (x axis \
showing the x values, not "Label 1", "Label 2", etc)? isCalculated should be true in this case, however \
it looks like it would be false with your patch.

EDIT: So I tried it out, and the x axis labels of a plotter chart are now indeed "January", "July", etc. \
(for the default chart) - instead of the x values.

I guess a correct solution would be to introduce a AbstractCartesianDiagram::Private::xAxisIsCalculated() \
method that can be overloaded by specific chart types. (Assuming your initial problem was x axis labels \
not being correct for stock charts).

Am 26.10.2010 um 16:04 schrieb Björn Breitmeyer:

> SVN commit 1189972 by breitmeyer:
> 
> Check for calculation mode did not worked for diagrams with
> datadimension > 1  corrected the check to > datasetDimesions().
> 
> 
> M  +1 -1      KDChartCartesianCoordinatePlane.cpp  
> 
> 
> --- trunk/koffice/plugins/chartshape/kdchart/src/KDChartCartesianCoordinatePlane.cpp #1189971:1189972
> @@ -310,7 +310,7 @@
> l.append(
> DataDimension(
> r.left(), r.right(),
> -                diagramIsVertical ? ( dgr->datasetDimension() > 1 ) : true,
> +                diagramIsVertical ? ( dgr->datasetDimension() > diagrams().first()->datasetDimension() \
> ) : true, axesCalcModeX(),
> gaH.gridGranularitySequence(),
> gaH.gridStepWidth(),


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic