There is a charts library called Charts 4 PHP ([login to view URL]). It comes with a nice simple API for plotting data from a database. It uses PHP.
I will purchase a licence for a programmer version, but you can download a free version for testing purposes.
I have data in a database like this:
Date | Total | Category
January 2015 | 20 | 1
February 2015 | 40 | 1
March 2015 | 61 | 2
March 2018 | 120 | 2
April 2018 | 92 | 4
So as you can see, there is data for a few years. Totals by category.
I want to be able to plot this data on Charts 4 PHP's line chart.
I need the ability to plot the following:
The user uses a list box to choose a date range from the following options:
- This year so far
- Last year
- Two years ago
- Last 18 months
- Last 24 months
- Last 36 months
(Note these dates are relative to today).
He then chooses up to three categories from a multi-select list box.
He clicks submit and the chart updates.
The chart shows Total on the y-axis and Month on the x-axis.
It should also show the legend for each category selected.
Any questions, just ask!