Pre loader

Week text format



I have a DateTimeAxis and the user can change the TextFormat. It has to be “mm/yyyy” or “dd/yyyy” or “ww/yyyy” but in the last case it does not work. To display in month or in the day format is working, but I have to display in week format to and I don’t know how to do it. Can you please help me with these?

  • You must to post comments

Hi Birigitta,

Please have a look at our documentation on SciChart WPF Axis Textformatting.

All Axis obey standard .NET Formatting strings via the AxisCore.TextFormatting property.
For a full list of standard .NET Formatting strings take a look at the pages

Because SciChart’s axis obeys .NET Textformatting, and because there is no text formatting for dates, it is not possible to display Week number in an axis with SciChart’s TextFormatting property.

However, all is not lost! You can actually format labels as anything you want using SciChart’s LabelProvider API.

All Axis Types include the AxisCore.LabelProvider property, which allows a class to be attached to an axis for complete control over axis label output.
Use the LabelProvider when you want to:

Have fine grained control over Axis Text or Cursor Labels, depending on numeric (or date) values
Display strings on the XAxis, e.g. “Bananas”, “Oranges”, “Apples” not “1”, “2”, “3”
Dynamically change the Axis TextFormatting as you zoom in or out
Dynamically change the Axis TextFormatting depending on Data-value

Using the LabelProvider API you should be able to achieve Week number formatting on a scichart axis. Please try it, and let us know the results!

Best regards,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies