Hi,
I'm looking for a chart to display non numerical data points. Something simple like months on the y axis, categories on the x axis, and simple points to represent them.
DataSet might look like, (Feb, Cat1), (Jan, Cat3).
I was hoping to use the scatter plot. However, the axis didn't like non numeric data.
Thank you for your suggestions in advance.
Can you provide some more information about your scenario? I am not sure I have ever seen a scenario where string data is useful on a scatter chart axis.
Also, if we supported DateTime values on the Y axis would that satisfy your requirement? That would let you create a line chart, or as Max suggested a Point chart that accepts DateTime values on the Y and string data (like categories) on the X axis.
Devin
Thanks for the replies.
Max,
I was thinking about converting the "categories" to numerics, then formating the axis labels, but wasn't sure how to do it. The closest example I could find was the date converter/formatter.
I'll try a Point Chart and investigate this idea further.
Devin,
Maybe a small similar data set would help give you some context.
(Jan,HR,Fail),(Jan,Accounting,Fail),(Jan,Sales,Fail)
(Feb,HR,Fail),(Feb, Accounting,Pass),(Feb,Sales,Fail)
(Mar,HR,Fail),(Mar, Accounting,Pass),(Mar,Sales,Pass)
etc...
I built a prototype as a POC. Essentially a grid, with y axis (HR, Accounting,Sales), x axis (Jan, Feb, Mar, etc...) and each datagrid cell a color(green for pass, red for fail).
Of course it's not as pretty, functional, or elegant as Infragistics.
Gabe
Here's a small point chart example that you might be able to use: <my:XamChart Background="AliceBlue" x:Name="chart"> <my:XamChart.Series> <my:Series ChartType="Point"> <my:Series.DataPoints> <my:DataPoint Value="3" Label="Jan"/> <my:DataPoint Value="5" Label="Feb"/> <my:DataPoint Value="2" Label="Mar"/> <my:DataPoint Value="1" Label="Apr"/> </my:Series.DataPoints> </my:Series> </my:XamChart.Series> <my:XamChart.Axes> <my:Axis AxisType="PrimaryY"> <my:Axis.Label> <my:Label Format="Category:{0}"/> </my:Axis.Label> </my:Axis> </my:XamChart.Axes> </my:XamChart>
Thanks Max! That was a very helpful example.
I'm curious how far the Label formatter extends. Is it possible to bind it? Say to an ObservableCollection<string>{"something","various","whatever"} ?
Thanks for your time and insight.
Unfortunately, there's currently no way to bind each label individually. Binding to the Format property will most likely just display the same text for all labels. I don't think there's a way to work around that right now. Please feel free to submit a feature request.
http://devcenter.infragistics.com/Protected/RequestFeature.aspx