-
Hi Simon, Legend can be used as a standalone control (this is new to 2010.1 release). You can place it wherever you want, including popup window. The following line shows how you can instantiate a legend on the page and bind its "legendItems" property to the "LegendItemCollection" of an existing chart. < ch : Legend Name = "StandAloneLegend" LegendItems = "{Binding LegendItemCollection, ElementName=MyChart}" /> Of course, the legend control allows all...
-
I've reproduced some of your problems: data point isn't shifted when the "Shift" property is changed. There was a problem in handling this change and it's being fixed. The fix will be available in the SP1. Menawhile, there is a workarround: when a data point is shifted out (i.e. Shift > 0) set the "Selected" property of that point to "true". When it's is shifted in, set "Selected=false". Do this after setting the "shift" value....
-
Yes, there are properties that can help: try setting Chart.InnerMargins="0" and Chart.RelativeDoughnutOuterCircleRadius="1" (presently it is 0.90 meaning that doughnut/pie would use 90% of the space).
-
The Chart has a problem refreshing properly when it is resized. The only way to avoid this problem is to fix the size of the chart or the size of its container. You are right, changing the font family of the axis labels can not be done. This was an oversight on our part and will be fixed in the next release. The font size can be changed though. Use the LabelsFontSize property of the Axis. Sorry for the inconvenience.
-
Unfortunately, there is no way to add an axis title at this point. We are planning to implement this feature in the next release.
-
This seems to be a bug. I have noted it down and we will fix it in a future release. In the meantime, you can specify the ChartKind for each series and this will populate the color of the legend items properly. For example: <Chart:Chart x:Name=" MyChart1a " XValue=" Month " Width=" 400 " Height=" 300 " LegendVisible=" True "> <Chart:Chart.DataSeries> <Chart:Series Id=" Series1 " YValue=" Value " ChartKind="...
-
Here is a working example for mrtouya where the series are created dynamically and where series can have a different chart type assigned to them. anyeone, you can modify this example for your needs. tjdhome, see the comment in the code. public class Data { public string Year { get ; set ; } public string Month { get ; set ; } public double Value { get ; set ; } public ChartKind Kind { get ; set ; } } public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); SetupNewChart...
-
The property Series.Label is the legend item text for a legend items related to a series. If this property is not set, Series.Id will be used. For Pie/Doughnut type of charts, legend items are related to data points. Again, DataPoint.Label will be used if it is set, otherwise DataPoint.X coordinate will be used. DataPoint.Label can be set in code behind, once the data structure is created, i.e. after Chart.DataSource is set. The other way is to assign it from data source. Yo can select the input...
-
When you have multiple series, the most common way is to provide data item type with values for all series. In this case it would be: public class TwoYearData { int Month { get ; set ; } double Value2000 { get ; set ; } double Value2001 { get ; set ; } } However, you might not know how many (and what) years are there when coding the solution. In that case we are talking “ Dynamic Series ”. That’s a feature of the charting control that makes possible creation of series at run time...
-
The problem is that you cannot create DataPoints in code. Instead, you should assign an IEnumerable object to the chart.DataSource property. This code should produce a nice chart: Chart _chart; Series _dataSeries; public class Data { public string X { get ; set ; } public double Y { get ; set ; } } private void SetupNewChart() { _chart = new Chart(); _chart.ChartKind = ChartKind.Cylinder; _dataSeries = new Series(); _chart.DataSeries.Add(_dataSeries); _chart.XValue = " X "; _dataSeries...