Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var clickedButton = (sender as Button);

            panelMain.Controls.Clear();
            Control newControl;
            var     str = clickedButton.Text;

            switch (str)
            {
            case "BASIC DRILLDOWN": newControl = new BasicDrillDownDemo(); break;

            case "ASYNC DRILLDOWN": newControl = new AsyncDrillDownDemo(); break;

            case "SUNBURST": newControl = new Sunburst(); break;

            case "TREEMAP": newControl = new TreeMap(); break;

            default: newControl = new BasicDrillDownDemo(); break;
            }

            newControl.Dock = DockStyle.Fill;
            panelMain.Controls.Add(newControl);

            //Paint selection button color
            foreach (Button item in panelLinks.Controls)
            {
                item.Image = null;
            }

            clickedButton.Image = _menuButtonImage;
        }
Exemple #2
0
 private void butSunburst_Click(object sender, RoutedEventArgs e)
 {
     Reset(ChartType.Sunburst);
     modelChart            = Sunburst.Create();
     controller.ChartModel = modelChart;
     RenderChart();
 }