示例#1
0
 public CustomChartData()
 {
     InitializeComponent();
     ChartFactory.InitComboBox(cbChartType, new Type[] { InitDiagram() });
     RowExportRule = RowFieldValueExportRule.ProductName;
     pivotGrid.ChartProvideRowFieldValuesAsType = typeof(string);
     cbRowFieldValuesExportRule.Items.AddRange(new string[] { "ProductName", "Category/ProductName",
                                                              "Encoded Product Category" });
     cbRowFieldValuesExportRule.SelectedIndex = 0;
     pivotGrid.DataSource = NWindContext.Create().SalesPersons.ToList();
     pivotGrid.MultiSelection.SetSelection(CreateSelectedPoints());
     SetMeasureUnits(DateTimeMeasurementUnit.Year, DateTimeMeasurementUnit.Quarter, DateTimeMeasurementUnit.Month);
     CollapseValues();
 }
示例#2
0
 void cbRowFieldValuesExportRule_SelectedIndexChanged(object sender, RoutedEventArgs e)
 {
     RowExportRule = (RowFieldValueExportRule)cbRowFieldValuesExportRule.SelectedIndex;
     pivotGrid.ChartProvideRowFieldValuesAsType = RowExportRule == RowFieldValueExportRule.CategoryEncoded ? typeof(Char) : typeof(string);
     pivotGrid.RefreshData();
 }