public MainWindow()
{
InitializeComponent();
var shapeChart = new XamShapeChart();
var legend = new Legend() { Content = "Legend" };
var data = new BreakEvenList();
var item = new BreakEvenItem() { FixedCost = 1000, VariableCost = 600, Revenue = 1800, Units = 100 };
data.Add(item);
shapeChart.ItemsSource = data;
shapeChart.Legend = legend;
shapeChart.Thickness = 3;
shapeChart.YAxisTitle = "Price ($)";
shapeChart.XAxisTitle = "Number of Units";
shapeChart.Title = "ShapeChart with BreakEvenData";
shapeChart.Brushes = this.GetBrushCollection();
Grid.SetColumn(legend, 1);
layoutRoot.Children.Add(shapeChart);
layoutRoot.Children.Add(legend);
}
private BrushCollection GetBrushCollection()
{
var brushes = new BrushCollection();
brushes.Add(new SolidColorBrush(Color.FromArgb(110, 127, 42, 250)));
brushes.Add(new SolidColorBrush(Color.FromArgb(128, 255, 49, 0)));
brushes.Add(new SolidColorBrush(Color.FromArgb(123, 2, 182, 2)));
brushes.Add(new SolidColorBrush(Color.FromArgb(246, 114, 34, 231)));
brushes.Add(new SolidColorBrush(Color.FromArgb(244, 198, 38, 0)));
brushes.Add(new SolidColorBrush(Color.FromArgb(249, 128, 128, 128)));
brushes.Add(new SolidColorBrush(Color.FromArgb(249, 40, 40, 40)));
brushes.Add(new SolidColorBrush(Color.FromArgb(238, 2, 152, 2)));
brushes.Add(new SolidColorBrush(Color.FromArgb(238, 7, 143, 228)));
return brushes;
}