incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clarence GUO <clarence.guo...@gmail.com>
Subject Re: [Call-for-​​Review]Bug 120271 - Stock chart using Date as Category has Incorrect min/max candlestick value
Date Fri, 13 Jul 2012 06:42:45 GMT
Hi~ Tian Bo,
Basically I can understand the root cause of this defect and your solution.
But could you please have a explanation in this issue in order to let more
people easily understand the problem?
I think the root cause is when update the chart view,
VSeriesPlotter::getMaximumYInRange will call
VDataSeriesGroup::getMinimumAndMaximiumYInContinuousXRange if the axis is
date format (if( !m_bCategoryXAxis || ( m_pExplicitCategoriesProvider &&
m_pExplicitCategoriesProvider->isDateAxis() ) )). That is why only when the
axis is changed to date format, the problem happen. But my question is, why
only for date axis, the maxinum and minimun Y values need to be
recalculated? Is it really necessary?
And about your solution, you add special handlig in
VDataSeriesGroup::getMinimumAndMaximiumYInContinuousXRange to detect
maxinum and minimum Y value. As your comment, it is for candle stick chart
only because I think only stock chart have maxinum and minimum Y values. my
concern is VDataSeriesGroup::getMinimumAndMaximiumYInContinuousXRange is a
common method, it is not very good to add special code here for only one
chart type because for most charts, they don't have maxinum and minimum Y
values. That means this code is redundant in most cases. My suggestion is
change CandleStickChart.cxx which is particually for stock chart view. Can
you make VSeriesPlotter::getMinimumAndMaximiumYInContinuousXRange to
virtual and have a new implementation in CandleStickChart which derive from
VSeriesPlotter and add your code in the new implementation?


2012/7/13 bo.tian <bo.tian@cs2c.com.cn>

> I had fix the bug 120271
> https://issues.apache.org/ooo/show_bug.cgi?id=120271
> Could anyone help me to review the fix ?
>
> And how was my last fix of bug 112701 ?
> https://issues.apache.org/ooo/show_bug.cgi?id=112701
>
>
>
> bo.tian

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message