I'm brand new at using the webchart control, trying to create a simple 2d line chart using the following data below. I'd like to end up with 2 lines, one for each company. The x-axis should have tick marks for each date (jan, feb, mar, etc..). Each line would represent a company and be labelled as such. The thrid column (value) represents the actual points on the lines. So far, all the examples i see online do not deal with this specific circumstance. Many of them assume that the incoming data contains seperate columns for each datapoint (for example in my case i would have seperate columns for Jan, Feb, Mar , etc... in my data set. In my case, my dataset contains the values that i'd like to use for my x-axis. Hope this makes sense. thanks for any assistance.
Company | Date | Value
Xerox 01/01/2008 | 100Xerox 02/01/2008 | 150Xerox 03/01/2008 | 152Xerox 04/01/2008 | 160Xerox 05/01/2008 | 135Walmart 01/01/2008 | 180Walmart 02/01/2008 | 108Walmart 03/01/2008 | 182Walmart 04/01/2008 | 123Walmart 05/01/2008 | 167
You can either use a table or series to fill the chart with data.
If you want to use a table, you can do the following:create another value column (unfortunately, each line has to have its own numeric column)leave all the xerox data in one column, put all walmart data in anotherset chart.Data.SwapRowsAndColumn = true (otherwise, each line will represent a row and you'll have 5 lines instead of 2)
If you use series, create 2 instances of NumericSeriesffill them with data by either adding points to the points collection or databinding themadd each series to the chart's Series collection.