Pre loader

Boxplot - Can't use Strings instead of Date as XAxis

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums


Hello, I have the Boxplot working (in WPF) using Dates as X-Axis.

But if I try to use String values, I get the following exception:

‘La invocación del constructor del tipo ‘ReservoirAnalytics.Windows.Boxplots’ que coincide con las restricciones de enlace especificadas produjo una excepción.’ (número de línea: ’16’; posición de línea: ’10’).

Cannot create a DataDistributionCalculator for the type TX=System.String

Esta es la línea:
var boxDataSeries = new BoxPlotDataSeries<string, double>();

  • You must to post comments

Hi Sebastian

To displays strings on the axis in SciChart, you need to use the LabelProvider feature.

How to do this.

1/ Declare your XyDataSeries with type int, double
2/ Let the XyDataSeries X values be equal to indexes e.g. 0, 1, 2, 3, 4
3/ Create a label provider that transforms this value into a string
4/ Finally set the XAxis.MajorDelta = 1 so that each label is shown

We have a worked example of this here

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