Tuesday 15 June 2010

c# - WPF Toolkit : Label data points on chart with distinct labels -


I want to add a label to my chart instead of the data point on the graph. For example, in each column in a column chart There will be a label at the top.

I need to do this program and the labels should be different from the labels on the axis of the chart. For example, in addition to my NoPoint [], which provides data to charts points, I need another array providing a label for the chart. I also have to do this dynamically, not in XAML.

Currently, I prepare my chart data with a SQL query. Ideally, I would like to use the third line in my SQL query to populate the chart label.

Well I understood this. I made a dictionary of free prices and labels, set it as the datacentax of my window, and for this the text box was bound with an IValueConverter which uses the dependent value to label it using the dictionary .

  & lt; TextBlock x: name = "textbox" text = "{binding key, converter = {static reassers annotation converter}}" fontweit = "bold" margin = "2" textwapping = "wrap" /> My authoring converter of the public class: Iv Convertor {Change the public object (type object value, type type, object parameter, cultureinfo culture) {if (MainWindow.annotations! = Null) {try {return key windows. Annotation [as the value string]; } Catch (kinotfound expression e) {return "tap"; }} Throwing new NotFiniteNumberException; } Public Object Convertback (Object Value, Type Type, Object Parameter, CultureInfo Culture) {New Notifient Number Exposure (); }}   

Potential improvements: Support more than one column per category in the category axis. So, if I have three times for June 2007, keep a separate label for all of them.

No comments:

Post a Comment