Ejemplo n.º 1
0
        /// <summary>
        ///  Initializes the new instance of <see cref="Adornments"> class.</see>/>
        /// </summary>
        public Adornments()
        {
            ApplicationLanguages.PrimaryLanguageOverride = "en-US";
            this.InitializeComponent();
            this.adornmentsViewModel = new ViewModelAdornments();
            pivotChart1.ItemSource   = ProductSales.GetSalesData();
            // Adding PivotAxis to the Control
            pivotChart1.PivotAxis.Add(new PivotItem {
                FieldMappingName = "Product", TotalHeader = "Total"
            });
            pivotChart1.PivotAxis.Add(new PivotItem {
                FieldMappingName = "Country", TotalHeader = "Total"
            });
            pivotChart1.PivotAxis.Add(new PivotItem {
                FieldMappingName = "State", TotalHeader = "Total"
            });

            // Adding PivotLegend to the Control
            pivotChart1.PivotLegend.Add(new PivotItem {
                FieldMappingName = "Date", TotalHeader = "Total"
            });

            //Adding PivotCalculations to the Control
            pivotChart1.PivotCalculations.Add(new PivotComputationInfo {
                FieldName = "Quantity", Format = "#.#"
            });
            pivotChart1.AdornmentsInfo = GetAdornmentsInfo();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Method is used to freeing the memory with clearing instances, events and objects.
 /// </summary>
 public sealed override void Dispose()
 {
     this.pivotChart1?.Dispose();
     this.pivotChart1 = null;
     this.pivotChart?.Dispose();
     this.pivotChart = null;
     this.adornmentsViewModel?.Dispose();
     this.adornmentsViewModel = null;
     this.busyIndicator?.Dispose();
     this.busyIndicator = null;
     if (this.rdBtnOlapDataSource != null)
     {
         this.rdBtnOlapDataSource.Click -= rdBtnOlapDataSource_Click;
     }
     this.rdBtnOlapDataSource = null;
     if (this.rdBtnRelationalData != null)
     {
         this.rdBtnRelationalData.Click -= rdBtnRelationalData_Click;
     }
     this.rdBtnRelationalData = null;
     base.Dispose();
 }