Questions tagged [mschart]

This tag refers to the System.Windows.Forms.DataVisualization.Charting and System.Web.ui.datavisualization.charting Namespaces, used to create controls for charting using the .NET framework.

This tag refers to the System.Windows.Forms.DataVisualization.Charting and System.Web.UI.DataVisualization.Charting Namespaces, used to create controls for charting using the .NET framework.

These namespaces have been available by default since version .NET Framework 4.0, and and have been available as an add-on available at no cost from Microsoft since .NET Framework 3.5 SP1. The download from Microsoft is called MSChart.exe. A very useful set of Sample code and demos is also available from microsoft.

1192 questions
6
votes
1 answer

Microsoft Chart Control: Prevent Series from appearing in Legend

In the MS Chart control (which they bought from Dundas), I have three series that need to be plotted. Two of the series should have an entry in the Legend, but the third should not. I've tried these lines of code, but none work: Chart c = new…
Jeff Meatball Yang
  • 37,839
  • 27
  • 91
  • 125
6
votes
1 answer

How do I create a bar chart showing percentages bound to a list of objects?

Using the DataVisualization.Charting.Chart control, I need to create a bar chart (maybe stacked bar chart) that shows per person the number of hours booked for that person and a those hours' percentage of total hours. So far I am a bit overwhelmed…
ProfK
  • 49,207
  • 121
  • 399
  • 775
5
votes
2 answers

How can I read the Series.Color during runtime when using a ChartColorPalette?

I have a chart with multiple Series. I am using the ChartColorPalette to set foreach Series automatically a different color. In that moment, when I am creating my Series, I want to read the Color to give a dropDownList.listItem the same…
np00
  • 218
  • 2
  • 6
5
votes
1 answer

Getting x-coordinate on Chart from mouse click

I have a chart on a Windows Form with several line graphs. I would like to be able to get the x-coordinate from a mouse click on the chart in such a way that the user would be able to place vertical annotations on the chart at the location of the…
bheklilr
  • 53,530
  • 6
  • 107
  • 163
5
votes
3 answers

How to set the BackImage of a ChartArea at run time?

Anyone know why the ChartArea.BackImage is a property of type string? Would it not have made more sense for this to have been a property of type Image? Or to put it another way, how can I set the background image of a ChartArea to an image generated…
Ben
  • 3,241
  • 4
  • 35
  • 49
5
votes
3 answers

Microsoft Chart stacked columns grouped with non-stacked

I was hoping to display data for 4 groups. Each group has 1 stacked column, and 1 non-stacked. Here's a mockup of what I'm after: Getting four groups is easy, this gives me what I want: Series series = chart.Series.Add("Budget"); series.ChartType…
5
votes
1 answer

MS chart radar axis frequency

I'd like to draw a radar chart using MS Chart control in a WinForms app. This chart contains data for 1 day, I have data for every seconds, so I have 86 400 x-y value pairs. X axis contains dates, y my int values. My test code is like this: var…
Tom
  • 3,899
  • 22
  • 78
  • 137
5
votes
1 answer

c# chart control remove spaces between bars in bar chart

I have a bar chart made with the c# .net chart control that looks like the following: As you can see there is a space between each pair of red and blue bars on the chart. Is there a way to remove those spaces? Thanks in advance! EDIT: Here are the…
pquest
  • 3,151
  • 3
  • 27
  • 40
5
votes
1 answer

Align primary and secondary axis in MSChart

I am trying to plot two data series in an MSChart. I am using two axes, but I want the gridlines and tick marks to be aligned. This is an example of what I have now: https://i.stack.imgur.com/a31ca.png (excuse the coloring) As you can see, the…
Martin Wiboe
  • 2,119
  • 2
  • 28
  • 50
5
votes
1 answer

F# chart control change legend text

when using F# chart control library, how can I specify the text of the legend? for instance: FSharpChart.Line [ for f in 0.0 .. 0.1 .. 10.0 -> cos f ] |> FSharpChart.WithLegend() shows a legend with text "GenericChart_Series_1". How can I…
ahala
  • 4,683
  • 5
  • 27
  • 36
5
votes
1 answer

ASP.NET MVC 3.0 Chart Helper display Legend

Is there any way to display legend on chart using chart helper? It is not displaying it by default, there is no property i can say to display and if i specify legend in xml :
Vasya Pupkin
  • 645
  • 1
  • 11
  • 18
5
votes
1 answer

MSChart Y-Axis and X-Axis Labelling

I have data plotted onto a MSChsart line graph. On the Y axis I have values ranging form 0 300. could anyone let me know is it possible to change my: Y-axis LABEL values from (0 to 300) to a value of (-150 to 150). without changing my Y-axis DATA…
codeBlocks
  • 51
  • 1
  • 2
5
votes
2 answers

MSChart X-axis is starting from -1 instead of 0

I posted this earlier but have just registered on the site today, I tried using the YourChartArea.AxisX.IsStartedFromZero = true; but its still starting at -1 :( I even tried incremented my Xaxis value (value +1), the data is plotted at point 2…
3.1 FTW
  • 51
  • 1
  • 3
5
votes
3 answers

Microsoft charts: transparency

I want a chart with transparent background, and therefore PNG seems a good choice. But when I set transparent background, the quality of the axis labels falls dramatically. How do I fix this? See the following code. As it stands, the chart has a…
xdzgor
  • 51
  • 1
  • 2
5
votes
2 answers

How does one set an image as or along a chart axis?

I am trying to use a colored spectrum strip as an axis for a chart. The idea is to match the color on the image with its associated wavelength along the x-axis at the bottom. The strip needs to change in size to match changes of the chart area and…
Alex Hong
  • 53
  • 4