This is a migrated thread and some comments may be shown as answers.

Data Structure for Line Chart

1 Answer 60 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 17 Apr 2020, 06:15 PM

I'm having a heck of a time building a line chart, showing what I want.

Here is the scenario: It is an MVC app, and I want to load a line chart with historical payroll data for each month, so along the bottom axis, there'd be a column for "Jan", "Feb", "Mar", "Apr", etc...  Along the side axis will be amounts.  Each column should be the value for the specific month.

There will be a variable number of line series for each year. A client may have values for 2017-2020, or values for 2014-2018.. SO the number of lines on the chart would be variable, but the columns are static...

I have attached an image of what the data looks like in a spreadsheet.  I am not building these series manually, they are coming from a database.  I just need some help with transforming the data as shown in the spreadsheet image into a collection that this damn line chart will accept, and plot how I want it to.

 

1 Answer, 1 is accepted

Sort by
0
Joe
Top achievements
Rank 1
answered on 17 Apr 2020, 08:03 PM
Never mind, with a great deal of trial and error, I got it to do what I want...
Tags
Chart
Asked by
Joe
Top achievements
Rank 1
Answers by
Joe
Top achievements
Rank 1
Share this question
or