.net - Not able to use Modern UI Charts for Windows 8 -
i trying use modern ui charts windows store app not able working.(cannot see chart)
a similar issue logged person here along code
can please help??
update 1
getting started free metro (modern ui) charts windows 8
i have created nuget package of modern chart. install there. uninstall previous library of modern chart.
i giving demo of chart. first create new page , add code. that's it!
mainpage.xaml
<page ... ... ... xmlns:chart="using:de.torstenmandelkow.metrochart" --> ... ... ...> <grid background="{staticresource applicationpagebackgroundthemebrush}"> <chart:piechart width="400" height="400" horizontalalignment="center" verticalalignment="center" chartsubtitle="chart fixed width , height" charttitle="minimal pie chart" > <chart:piechart.series> <chart:chartseries displaymember="category" itemssource="{binding path=errors}" seriestitle="errors" valuemember="number" /> </chart:piechart.series> </chart:piechart> </grid> </page>
mainpage.xaml.cs
public sealed partial class mainpage : page { public mainpage() { this.initializecomponent(); this.datacontext = new mainviewmodel(); } protected override void onnavigatedto(navigationeventargs e) { } }
mainviewmodel.cs
public class mainviewmodel { public observablecollection<testclass> errors { get; private set; } public mainviewmodel() { errors = new observablecollection<testclass>(); errors.add(new testclass() { category = "globalization", number = 75 }); errors.add(new testclass() { category = "features", number = 2 }); errors.add(new testclass() { category = "contenttypes", number = 12 }); errors.add(new testclass() { category = "correctness", number = 83 }); errors.add(new testclass() { category = "best practices", number = 29 }); } } public class testclass { public string category { get; set; } public int number { get; set; } }
best of luck!
Comments
Post a Comment