microsoft-chart-controls

How do I graph multiple columns on the Y-axis? (MS Chart Controls)

旧巷老猫 提交于 2019-12-03 09:00:25
Trying to follow this example: http://weblogs.asp.net/dwahlin/archive/2008/11/25/getting-started-with-the-asp-net-3-5-chart-control.aspx I have a database with 4 columns, 3 of the columns are int (1-10) and the other is a "DateTime". I am trying to graph the 3 columns vs the DateTime(X-axis) on one line chart. To add more than one y axis value I go to the Series property -> YValueMembers (notice the plural) and enter my 3 columns of the database (followed by commas) that I want on the Y axis.....but doesn't seem to work. I get a run time error saying only 1 column is allowed on the Y axis.

Percent value in y axis of Column Chart Microsoft chart control

半世苍凉 提交于 2019-12-01 22:12:31
问题 I am trying to get Column charts, where I need to have percentage value in y axis and should recalculate and scale. I have seen some suggestion to assign minimum and maximum value ( chart.ChartAreas[0].AxisY.Minimum=0 ) but it's not adjusting the column height according to the percentage. Any help will be appreciated. Below is what I have done so far foreach (var value in labels) { chart.Legends[value].Alignment = StringAlignment.Center; chart.Legends[value].Docking = Docking.Bottom; chart

Percent value in y axis of Column Chart Microsoft chart control

笑着哭i 提交于 2019-12-01 18:46:33
I am trying to get Column charts, where I need to have percentage value in y axis and should recalculate and scale. I have seen some suggestion to assign minimum and maximum value ( chart.ChartAreas[0].AxisY.Minimum=0 ) but it's not adjusting the column height according to the percentage. Any help will be appreciated. Below is what I have done so far foreach (var value in labels) { chart.Legends[value].Alignment = StringAlignment.Center; chart.Legends[value].Docking = Docking.Bottom; chart.Series[value].ChartType = SeriesChartType.Column; chart.Series[value].IsValueShownAsLabel = true; chart

Enabling mouse wheel zooming in a Microsoft Chart Control

萝らか妹 提交于 2019-11-29 14:04:40
how to enable zooming in Microsoft chart control by using Mouse wheel I have the below code, i need to know how to make this event? in which class it is.. private void chData_MouseWheel(object sender, MouseEventArgs e) { try { if (e.Delta < 0) { chart1.ChartAreas[0].AxisX.ScaleView.ZoomReset(); chart1.ChartAreas[0].AxisY.ScaleView.ZoomReset(); } if (e.Delta > 0) { double xMin = chart1.ChartAreas[0].AxisX.ScaleView.ViewMinimum; double xMax = chart1.ChartAreas[0].AxisX.ScaleView.ViewMaximum; double yMin = chart1.ChartAreas[0].AxisY.ScaleView.ViewMinimum; double yMax = chart1.ChartAreas[0].AxisY

Winforms chart: how to enable background color gauge

送分小仙女□ 提交于 2019-11-29 12:22:12
I'm looking for a way to enable custom background color gauge in the Winform chart control library. Here is an example: See the green, yellow, and red color in the background? Now, I need is a way to customize the background color gauge by controlling the starting/ending Y values, the color itself, as well as the number of different colors. Thanks in advance! You can do that by adding StripLines to the y-Axis of the ChartArea . Their positions and sizes are controlled by their StripWidth , Interval and IntervalOffset properties. All values are set in data values , so in the example above the

Enabling mouse wheel zooming in a Microsoft Chart Control

房东的猫 提交于 2019-11-28 07:57:41
问题 how to enable zooming in Microsoft chart control by using Mouse wheel I have the below code, i need to know how to make this event? in which class it is.. private void chData_MouseWheel(object sender, MouseEventArgs e) { try { if (e.Delta < 0) { chart1.ChartAreas[0].AxisX.ScaleView.ZoomReset(); chart1.ChartAreas[0].AxisY.ScaleView.ZoomReset(); } if (e.Delta > 0) { double xMin = chart1.ChartAreas[0].AxisX.ScaleView.ViewMinimum; double xMax = chart1.ChartAreas[0].AxisX.ScaleView.ViewMaximum;