Polynomial and moving average regression lines for chart
Markus Mohrhard
markus.mohrhard at googlemail.com
Mon May 27 03:05:42 PDT 2013
Hey Tomaž,
2013/5/27 Tomaž Vajngerl <quikee at gmail.com>:
> Hi,
>
> I have implemented the polynomial and moving average regression curves
> (trend lines) for chart. I have pushed the changes to a feature branch
> "feature/polynomialregression" so please test it if you are interested. The
> work is still ongoing but I want some feedback.
Awesome that finally someone is going to work on this feature.
>
> Currently implemented is:
> - calculating of polynomial and moving average curve
> - limited the curve calculation to min and max X value.
> - properties degree and period for regression curve
> - added extrapolation
> - extended the "trend line" dialog (but it would be better to convert it to
> the new dialog infrastructure but this is a lot of work)
We can try to find someone doing the work in glade so that it would be
just adapting the code which I can quickly do if necessary.
>
> Still missing:
> - intercept
> - finish changes to dialog
> - changing import/export filters to support
> - revise the proposal to extend ODF
>
> I have made some changes to the IDL files so probably this is an API change
> (It is my first time changing a IDL so I don't know what to do in this
> case). Can somebody take a look at it?
I will do but chart is a bit special. There should be no changes to
published interfaces in com/sun/star/chart and all changes should be
made to the unpublished ones in com/sun/star/chart2. This means in
your case that you must duplicate some of the exisiting enums into
chart2 and extend them there.
>
> The enum ChartRegressionCurveType
> ("offapi/com/sun/star/chart/ChartRegressionCurveType.idl") represents the
> various types of regression lines. Polynomial type was already in (however
> it was deprecated) but I also need to add MOVING_AVERAGE type. If I add it,
> compilation fails - do I have to do something else? ChartRegressionCurveType
> is only used in
> "chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx"
> and it does not influence the current functionality (but might be a problem
> with filters).
As mentioned above com/sun/star/chart should not be changed even with
our relaxed requirements for API changes. All the changes for charts
should go into chart2 as the old chart API is stable, used outside of
LibO and on its way to become deprecated. However this also means to
adapt the corresponding import/export code as it surely uses the chart
API and not the new chart2 API for this feature.
I'll have a closer look later today.
Regards,
Markus
More information about the LibreOffice
mailing list