I want to show with a multiline the info in the screenshot, but I can´t transpose the files to columns. What should I do to draw a multiline or Area Accumulated chart with this kind of query result?
(I should draw something as you will see in the second screenshoot - GoogleSheet Sample)
Take a look what I did at the chart, fields and Query.
BUT, I should get this (results.jpg)
Maybe you can send me some sample to draw a Line Chart as I need...
Remember: I just can get THREE columns: DATE, METER NAME and ENERGY.
You said: "The date column will be used for the X axis, and the other two columns will be used for generating the line chart." Well. This isn´t correct. I can get the DATE column (for the X axis), the Energy value (for the Y axis) and each line should show the meter value (I have 96 meters, so I should see about 96 lines)
To get a chart like that, you need to restructure your table. You can take a look at the attachments, and see how the table should look like in order to display a similar line chart.
Each column represents a new line in the chart, while the Date column is used for the X axis.
The plugin can't perform pivot, so you'll either need to do it manually, or create a PIVOT table in the database. When you do that, you will need to create a MySQL view (a stored query), which will return that pivot table; call it (for example) “view1” and then build a wpDataTable based on a simple query like “SELECT * FROM view1″.
Unfortunately, the logic of the free chart libraries works like this, and the series need to be saved as columns.
I have this info:
Several meters (energy generation).
each one generates energy each day.
I want to show with a multiline the info in the screenshot, but I can´t transpose the files to columns. What should I do to draw a multiline or Area Accumulated chart with this kind of query result?
(I should draw something as you will see in the second screenshoot - GoogleSheet Sample)
Hello Adrian
You should be able to create a chart like this with the table you've shown in the screenshot.
The date column will be used for the X axis, and the other two columns will be used for generating the line chart.
What do you get when you use this table?
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
I can´t see what I need.
Take a look what I did at the chart, fields and Query.
BUT, I should get this (results.jpg)
Maybe you can send me some sample to draw a Line Chart as I need...
Remember: I just can get THREE columns: DATE, METER NAME and ENERGY.
You said: "The date column will be used for the X axis, and the other two columns will be used for generating the line chart." Well. This isn´t correct. I can get the DATE column (for the X axis), the Energy value (for the Y axis) and each line should show the meter value (I have 96 meters, so I should see about 96 lines)
Hi again Adrian.
To get a chart like that, you need to restructure your table. You can take a look at the attachments, and see how the table should look like in order to display a similar line chart.
Each column represents a new line in the chart, while the Date column is used for the X axis.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Yes... I understand that.... And for that is my first question... How should I do to transpose the files to columns ?...
Please let me know how do you think I can do that. (Because this is not the usual way to save values in a sql table).
Imagine that... Today I have 100 meters. Tomorrow I'll have 100 more.... Should I create 100 more columns in the table? That make no sense....
Hi again Adrian
The plugin can't perform pivot, so you'll either need to do it manually, or create a PIVOT table in the database. When you do that, you will need to create a MySQL view (a stored query), which will return that pivot table; call it (for example) “view1” and then build a wpDataTable based on a simple query like “SELECT * FROM view1″.
Unfortunately, the logic of the free chart libraries works like this, and the series need to be saved as columns.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables