Project

General

Profile

Actions

Feature #3317

closed

Chart::WAxis add autoDateFormat() virtual function

Added by Stefan Ruppert over 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Benoit Daccache
Target version:
Start date:
06/12/2014
Due date:
% Done:

0%

Estimated time:

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

WAxis.C.patch (3.33 KB) WAxis.C.patch WAxis.C patch Stefan Ruppert, 06/12/2014 05:27 PM
WAxis.patch (735 Bytes) WAxis.patch WAxis patch Stefan Ruppert, 06/12/2014 05:27 PM
WAxis.patch (1.37 KB) WAxis.patch A new patch using a boost::function delegate Stefan Ruppert, 07/17/2014 01:02 PM
WAxis.C.patch (1.24 KB) WAxis.C.patch A new patch using a boost::function delegate Stefan Ruppert, 07/17/2014 01:02 PM

Updated by Stefan Ruppert over 10 years ago

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

Actions #2

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

Actions #3

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

Actions #4

Updated by Koen Deforche over 10 years ago

  • Status changed from Feedback to New
Actions #5

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
Actions #6

Updated by Koen Deforche about 10 years ago

  • Status changed from Resolved to Closed
Actions #7

Updated by Koen Deforche almost 10 years ago

  • Status changed from Closed to InProgress
Actions #8

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.

Actions #9

Updated by Benoit Daccache over 9 years ago

  • Status changed from InProgress to Resolved
Actions #10

Updated by Koen Deforche over 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF