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>
Is there a way to plot random point using point chart.
For example I want to plot a point at (2,5) and the next point at (5,8). The starting coordinate for x axis is 0 ending coordinate is 10. The y axis is also divided in a similar way.
Thanks,
Junaid
I cannot use scatter chart as I am trying to plot these points on a line chart.
Ju
if your points have XY coordinates, then you need a scatter series, not a line series. unfortunately these two series types cannot be combined in XamChart, so you would need to convert your lines to scatterline series, then add the scatter series on top.
or, you could use the new XamDataChart control, which does allow line series to be combined with scatterline series (you just need a 2nd x-axis).
I will try to look into scatterline. I am attaching the screenshot of the graph which I am trying to implement. I have the line chart which I plotted by reading the data from a collection. This line chart is used as a template. Now I want to plot random points on the graph. These points may or may not fall on the line chart.(Points may not coincide with the line). The first point could be at (2,5) and the next point could be at (4,7). In the screenshot I was able to plot two points but I could only reference the Y axis not both the X and the Y axis. The points are not random. When I plot a new point it appears immediately after the point previously plotted on the X axis. I need a solution to the problem.
I'm not sure I understand. So you're combining a line series and point series? There may be several workarounds here, which may or may not work for you, since I can't see the big picture.
You can use ScatterLine series to display lines on a numeric scale. Then, you can use scatter series to display random disconnected points.
If you must use a series with a string X axis, then your options are very limited. You can still use a point series to display disconnected points if you pad the series with empty values. For example, if you have 10 values on the x axis, your point series can have something like null, null, 5, null ... etc to draw a point at (2,5). These don't have to be nulls, they could be zeroes, negatives, or empty values, whatever makes them not visible.
Hope this helps you.