[SOLVED] ChartJS custom Display Format for time

Answered
0
0

Hi,

I need a custom display format for time.

Documentation: https://www.chartjs.org/docs/latest/axes/cartesian/time.htm

at the end of page use Parser, but it is not implemented on Wisej,

please can you update it or supply a workaround?

best

Cristian Zerbinati

  • You must to post comments
Best Answer
0
0

Hi Cristian,

We just added the new config option, DisplayFormats, which will be available in the next build and in the Wisej-Extensions Github repository (https://github.com/iceteagroup/wisej-extensions)

You can use it like this:

Time = new ScaleTime {
  DisplayFormats = new {
    day = "MMM DD YYYY"
  }
},

Let me know if you have any questions or issues with it!

Best,

Levie

  • You must to post comments
0
0

Hi Levie,

thank you, with DisplayFormat it work!

Please can you write an example also with Parser? I could be wrong myself

best

Cristian

  • You must to post comments
0
0

may be Time.Unit override Parser?

  • You must to post comments
0
0

Hi Levie,

thank you! I have download the extension, now I have the property Parser, but the result don’t change. Please can you check it?

best

  • Levie (ITG)
    Hi Cristian, what do you mean the result doesn’t change? Is your goal to change the display format of the dates on the chart? Or to setup a custom parser for your unique date format from the Wisej application? If you’re trying to change the display format of the date, we’ll add the DisplayFormats configuration option (https://www.chartjs.org/docs/latest/axes/cartesian/time.html#display-formats). Let me know! -Levie
  • You must to post comments
0
0

Hi Cristian,

We can add the Parser configuration option to the ChartJS extension. I’ll log it as an enhancement and update the GitHub repository wisej-extensions (https://github.com/iceteagroup/wisej-extensions/tree/2.2/Wisej.Web.Ext.ChartJs).

Please let me know if you need anything else!

Best,

Levie

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.