Feature #3317
closedChart::WAxis add autoDateFormat() virtual function
0%
Description
Hi,
currently automatic DateTimeScale uses hard-coded date/time formats within WAxis::getLabelTicks() function. Add a protected
protected:
virtual Wt::WString autoDataFormat(const WDateTime& dt, DateTimeUnit unit, bool atTick);
and use the current hard-coded formats as a default implementation.
See the attached patches. Note I just wrote down the changes but did not compiled or tested it.
Files
Updated by Stefan Ruppert over 10 years ago
- File WAxis.patch WAxis.patch added
- File WAxis.C.patch WAxis.C.patch added
Hi,
today I have changed WAxis to be able to call a user-defined autoDateFormat() function. I realized that a protected function does not work, since the WAxis instances are members of the chart. Therefore a introduced a setAutoDateFormat(boost::function fn) method which can be used to set a delegate method.
I would really like to see this feature included into Wt!
Regards,
Stefan
Updated by Koen Deforche over 10 years ago
- Status changed from New to Feedback
Hey,
Perhaps the virtual function is better; but then we simply need to change how we store WAxis in WCartesianChart (i.e. with pointer) and provide setAxis() functions?
In that way, the same functionality can be made available in Java as well (which doesn't have function objects).
Regards,
koen
Updated by Stefan Ruppert over 10 years ago
Hi Keon,
currently we use the provided patch to add this functionality to wt-3.3.2 which we currently use for production. I have no problem to change it to a virtual function when upgrading to wt-3.3.4.
Regards,
Stefan
Updated by Koen Deforche about 10 years ago
- Status changed from New to Resolved
- Assignee set to Michael Vilsker
- Target version set to 3.3.4
Updated by Koen Deforche about 10 years ago
- Status changed from Resolved to Closed
Updated by Koen Deforche almost 10 years ago
- Status changed from Closed to InProgress
Updated by Koen Deforche over 9 years ago
- Assignee changed from Michael Vilsker to Benoit Daccache
- Target version changed from 3.3.4 to 3.3.5
Since WAxis is now virtual, a virtual function can be used.
Updated by Benoit Daccache over 9 years ago
- Status changed from InProgress to Resolved
Updated by Koen Deforche over 9 years ago
- Status changed from Resolved to Closed