.NET Framework Bookmark and Share   
 index > Chart Controls for .NET Framework > need to create a very simple bar chart
 

need to create a very simple bar chart

So I have my more complicated graphs working. Now I have a graph I needto create where I just want to show the user's score on one question graphically. So if they scored '65%', I would like to show a bar from 0 - 100% and indicate a mark at the 65% spot and annotate it with the actual score. And either fill it just from 0 - 65 or not, I don't care at this point.

Can someone give me a thought as to how to best use the charting control to do this. Seems like it should be easy, but I don't see it.

Thanks!
apple17
use 100% Stacked Bar Chart. Take 2 series and add 100 to one series and the score to other series.

Here was a small example


Dim rand As New Random

        Chart1.Series.Add("Series1")
        Chart1.Series.Add("Series2")
        For a = 1 To 10
            Chart1.Series("Series1").Points.AddY(rand.Next(45, 95))<br/>            Chart1.Series("Series2").Points.AddY(100)
        Next a

        Chart1.Series("Series1").ChartType = SeriesChartType.StackedBar100
        Chart1.Series("Series1").IsValueShownAsLabel = True
        Chart1.Series("Series2").ChartType = SeriesChartType.StackedBar100

Please remember to click “Mark as Answer�on the post that helps you, and to click “Unmark as Answer�if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
KishorePV
wen u download the charts control from codeplex, also download the samples, and that will give you a clear understanding on how the charts work,
nivash_ns

You can use google to search for other answers

Custom Search

More Threads

• Does the install touch the .Net framework?
• Printed chart looks different to that on screen
• Using MS Chart assemblies in ASP.NET Application without installation
• The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) Word interop on RE-open
• Display percentage and value in data labels?
• I want to specify the colors of my bar chart
• Build Bar Chart Dynamically
• In the Crystal Report, change the data displayed at runtime
• How to get/track Browser's refresh button click event?
• Legend position calculation problem