Exemple #1
0
        void Initialize() {
            this.dataProvider = DataSource.GetDataProvider();
            this.range = this.currentRange = DateTimeUtils.GetOneYearRange();
            ucSales.Diagram.AxisY.Visibility = Utils.DefaultBoolean.False;
            ucSales.Diagram.AxisX.Visibility = Utils.DefaultBoolean.False;
            ucUnits.Diagram.AxisY.Visibility = Utils.DefaultBoolean.False;
            ucUnits.Diagram.AxisX.Visibility = Utils.DefaultBoolean.False;
            ucUnits.Diagram.Margins.All = 0;
            ucUnits.Diagram.Rotated = true;
            ucUnits.chart.Legend.AlignmentVertical = LegendAlignmentVertical.Top;
            ucUnits.chart.Legend.AlignmentHorizontal = LegendAlignmentHorizontal.RightOutside;

            ucUnits.chart.Legend.Border.Visibility = Utils.DefaultBoolean.False;
            ucUnits.chart.Legend.Margins.Right = 0;
            ucUnits.chart.Legend.MarkerSize = new System.Drawing.Size(18, 18);
            ucUnits.chart.Legend.MarkerVisible = true;
            ucUnits.chart.Legend.TextOffset = 8;
            ucUnits.chart.Legend.VerticalIndent = 4;
            ucUnits.chart.Legend.Visibility = Utils.DefaultBoolean.True;
            ucUnits.chart.Series[0].LegendTextPattern = "{A}";
            ucSales.Diagram.Margins.All = 0;

            Palette palette = ChartUtils.GeneratePalette();
            this.rangeControlClient = new RangeControlSalesClient(palette[3].Color);
            this.rangeControlClient.YearMonth = true;
            rangeControl.Client = this.rangeControlClient;
            IEnumerable<SalesGroup> sales = dataProvider.GetSales(range.Start, range.End, GroupingPeriod.Day);
            this.rangeControlClient.UpdateData(sales);

        }
Exemple #2
0
        public ucSalesByRange() {
            InitializeComponent();

            Palette palette = ChartUtils.GeneratePalette();
            pieChart.PaletteRepository.Add(palette.Name, palette);
            pieChart.PaletteName = palette.Name;
            pieChart.CustomDrawSeriesPoint += ChartUtils.CustomDrawSeriesPointLegendMarker;

            barChart.PaletteRepository.Add(palette.Name, palette);
            barChart.PaletteName = palette.Name;
            barChart.CustomDrawAxisLabel += ChartUtils.CustomDrawAxisYLabel;
            
            rangeControlSalesClient = new RangeControlSalesClient(Palette[3].Color);
        }
        public ucSalesByRange()
        {
            InitializeComponent();

            Palette chartPalette = ChartUtils.GeneratePalette();

            pieChart.PaletteRepository.Add(chartPalette.Name, chartPalette);
            pieChart.PaletteName            = chartPalette.Name;
            pieChart.CustomDrawSeriesPoint += ChartUtils.CustomDrawSeriesPointLegendMarker;

            barChart.PaletteRepository.Add(chartPalette.Name, chartPalette);
            barChart.PaletteName          = chartPalette.Name;
            barChart.CustomDrawAxisLabel += ChartUtils.CustomDrawAxisLabel;

            rangeControlSalesClient = new RangeControlSalesClient(Palette[3].Color);
        }