示例#1
0
 public frmBarChart(CChartParameter ip_obj_chart_para, DataTable ip_DataTable )
 {
     InitializeComponent();
     InitialBarChart(ip_obj_chart_para);
     m_dataSource = new ChartDataSourceInterface(ip_DataTable, ip_obj_chart_para);
     this.barChart.DataSource = m_dataSource.HorizontalDataTable;
 }
示例#2
0
 public frmPieChart(CChartParameter ip_chart_para,DataTable ip_DataTable)
 {
     m_dataSource = new ChartDataSourceInterface(ip_DataTable, ip_chart_para);
     InitializeComponent();
     FillEdgeColorTypeListBox();
     InitializeChart();
 }
示例#3
0
        private void InitialBarChart(CChartParameter ip_obj_chart_para)
        {
            // Not AutoScale
            comboBoxSizingMode.SelectedIndex = 1;
            //barChart.SizingMode = HBarChart.BarSizingMode.Normal;

            // Percent
            comboBoxValueMode.SelectedIndex = 1;
            barChart.Values.Mode = CValueProperty.ValueMode.Percent;

            // Glass
            comboBoxDrawingMode.SelectedIndex = 0;

            // Radial gradient background
            radioButtonBKRadial.Select();

            barChart.Border.Width = 10;
            barChart.Shadow.Mode = CShadowProperty.Modes.Both;
            barChart.Shadow.WidthInner = 1;
            barChart.Shadow.WidthOuter = 4;
            barChart.Shadow.ColorOuter = Color.FromArgb(100, 0, 0, 0);

            this.comboBoxShadowMode.SelectedIndex = 3;
            this.trackBarOuterShadow.Value = 4;
            this.trackBarInnerShadow.Value = 1;

            checkBoxDescription.Checked = true;
            barChart.Description.Visible = checkBoxDescription.Checked;

            checkBoxShowValues.Checked = true;
            barChart.Values.Visible = checkBoxShowValues.Checked;

            checkBoxLabels.Checked = true;
            barChart.Label.Visible = checkBoxLabels.Checked;

            checkBoxTooltips.Checked = true;

            barChart.Description.Text = ip_obj_chart_para.StrCaptionOfChart;
            textBoxDesc.Text = barChart.Description.Text;

            // Register for control events
            barChart.BarClicked += new HBarChart.OnBarEvent(barChart_BarClicked);
            barChart.BarDoubleClicked += new HBarChart.OnBarEvent(barChart_BarDoubleClicked);
            barChart.BarMouseEnter += new HBarChart.OnBarEvent(barChart_BarMouseEnter);
            barChart.BarMouseLeave += new HBarChart.OnBarEvent(barChart_BarMouseLeave);

            bool b = comboBoxSizingMode.Focus();
        }