public void SetSalesPerformanceProvider(ISalesPerformanceProvider provider, DateTime?date) { this.provider = provider; Series.ArgumentDataMember = provider.ChartArgumentDataMember; Series.ValueDataMembers.AddRange(provider.ChartValueDataMember); switch (provider.ChartType) { case SalesPerformanceChartType.Area: Series.ChangeView(ViewType.Area); Diagram.AxisX.WholeRange.AutoSideMargins = false; ((AreaSeriesView)Series.View).Border.Visibility = Utils.DefaultBoolean.False; ((AreaSeriesView)Series.View).Transparency = 64; break; case SalesPerformanceChartType.Bar: Series.ChangeView(ViewType.Bar); BarSeriesView view = ((BarSeriesView)Series.View); BarSeriesLabel label = ((BarSeriesLabel)Series.Label); view.ColorEach = true; view.Transparency = 0; view.Border.Visibility = Utils.DefaultBoolean.False; label.Position = BarSeriesLabelPosition.TopInside; label.Border.Visibility = Utils.DefaultBoolean.False; label.FillStyle.FillMode = FillMode.Empty; label.TextColor = Color.White; label.Indent = 6; label.EnableAntialiasing = Utils.DefaultBoolean.True; Diagram.AxisX.WholeRange.AutoSideMargins = true; Series.LabelsVisibility = DefaultBoolean.True; break; default: break; } switch (provider.Mode) { case SalesPerformanceMode.Day: SetDayMode(); break; case SalesPerformanceMode.Month: SetMonthMode(); break; } if (date == null) { date = DateTime.Today; } currentDate = date.Value; UpdateSalesValues(); UpdateChart(currentDate); UpdateNavigationButtons(true, true); }
public void SetSalesPerformanceProvider(ISalesPerformanceProvider provider, DateTime? date) { this.provider = provider; Series.ArgumentDataMember = provider.ChartArgumentDataMember; Series.ValueDataMembers.AddRange(provider.ChartValueDataMember); switch (provider.ChartType) { case SalesPerformanceChartType.Area: Series.ChangeView(ViewType.Area); Diagram.AxisX.WholeRange.AutoSideMargins = false; ((AreaSeriesView)Series.View).Border.Visibility = Utils.DefaultBoolean.False; ((AreaSeriesView)Series.View).Transparency = 64; break; case SalesPerformanceChartType.Bar: Series.ChangeView(ViewType.Bar); BarSeriesView view = ((BarSeriesView)Series.View); BarSeriesLabel label = ((BarSeriesLabel)Series.Label); view.ColorEach = true; view.Transparency = 0; view.Border.Visibility = Utils.DefaultBoolean.False; label.Position = BarSeriesLabelPosition.TopInside; label.Border.Visibility = Utils.DefaultBoolean.False; label.FillStyle.FillMode = FillMode.Empty; label.TextColor = Color.White; label.Indent = 6; label.Antialiasing = true; Diagram.AxisX.WholeRange.AutoSideMargins = true; Series.LabelsVisibility = DefaultBoolean.True; break; default: break; } switch (provider.Mode) { case SalesPerformanceMode.Day: SetDayMode(); break; case SalesPerformanceMode.Month: SetMonthMode(); break; } if(date == null) date = DateTime.Today; currentDate = date.Value; UpdateSalesValues(); UpdateChart(currentDate); UpdateNavigationButtons(true, true); }
public void SetSalesPerformanceProvider(ISalesPerformanceProvider provider) { SetSalesPerformanceProvider(provider, null); }
public void SetSalesPerformanceProvider(ISalesPerformanceProvider provider) { SetSalesPerformanceProvider(provider, null); }