-2
我想在Windows Phone應用程序中使用amchart創建圖表。這是我的代碼,當我運行我有這個消息「不能隱式轉換類型'字符串'System.Windows.Media.Brush 「我怎樣才能解決這個製圖在Windows手機應用程序
InitializeComponent();
XDocument data = XDocument.Load("Data.xml");
var results = from query in data.Descendants("year")
select new ResultModel((string)query.Element("month"),
(int)query.Element("actual"));
var chart = new SerialChart
{
CategoryValueMemberPath = "month",
AxisForeground="White",
PlotAreaBackground="Black",
GridStroke="DarkGray"
};
chart.SetBinding(SerialChart.DataSourceProperty, new Binding("results"));
var lineGraph = new LineGraph
{
Title = "Sales",
ValueMemberPath = "actual",
};
chart.Graphs.Add(lineGraph);
sta.Children.Add(chart);
}