SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components

0
0

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>();

Version
6.6.0.26505
  • You must to post comments
0
0

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
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.