This project is read-only.
1
Vote

chart error

description

var clSers = new ColumnSeries();
        clSers.Title = "Population";
        clSers.ItemsSource = vm.Items;
        clSers.IndependentValueBinding = new Binding() { Path = new PropertyPath("Category") };
        clSers.DependentValueBinding = new Binding() { Path = new PropertyPath("Datavalue") };
        this.Chart.Series.Add(clSers);
i tried the above code in winrtxaml toolkit its giving error like this

System.Exception: No installed components were detected.

Cannot apply a Style with TargetType 'WinRTXamlToolkit.Controls.DataVisualization.Charting.DataPointSeries' to an object of type 'Windows.UI.Xaml.IDependencyObject'.
at Windows.UI.Xaml.UIElement.Measure(Size availableSize)
at WinRTXamlToolkit.Controls.DataVisualization.Charting.Primitives.EdgePanel.MeasureOverride(Size constraint)
at Windows.UI.Xaml.FrameworkElement.MeasureOverride(Size availableSize)

comments

marc_plessis wrote Sep 11, 2015 at 8:48 AM

Hello,

i have exactly the same problem with StackColumnSerie.
But i have found a solution.

Add :
<charting:ColumnSeries /> 
in your definition chart, in your xaml page and on cs page modify your code with :
var clSers = (ColumnSeries)this.Chart.Series[0];
And finally delete your line
 this.Chart.Series.Add(clSers)
And it's work !