Could you please provide me with the code for highcharts to parse a wpdatatables datetime column or provide a viable alternative for using dates & times in highcharts?
I have date & time variable data and I cannot find how to get high charts to interpret the wpdatatables datetime column as a time value and not a category. Google charts does a fine job of spacing data according to their respective temporal variances.
Date format is "d Mon Y" and time format is 24hr. All times are in UTC.
Sorry for the late response, we have some agents that have contracted Covid-19, so our team is cut in half.
Sorry but I did not quite understand what are you trying to achieve. Can you please explain me in little more details and send me some example/screenshot/screencast, so I see on exaclty what you mean and I will give you my suggestion.
Thanks for getting back to me! No worries on reply time, I'm a bit slow myself these days.
To restate: I want to use highcharts but with a datetime x axis. That's pretty much it. It seems like this should work if I only use date and not time. However, it seems like this "just works" with google charts, the graph is just not as readable as highcharts. I've attached 2 screenshots that might help show what I'm trying to do.
The reason I think this is a TMS thing, rather than just a highcharts thing is because it seems like the "datetime" data type should produce roughly similar behavior across all rendering engines and not be categorical on one engine but temporal on another. With that said, I think the solution will be some highcharts options.
Thoughts?
Here's the code I have so far:
if (typeof wpDataChartsCallbacks == 'undefined') {
This is strange, and what can I ask to make this more clear are that Highcharts use Follow table filtering and is table on same page? Like that on Highcharts will show only filtered data from table.
If this is not the case can you pelase provide me a source for this table that is used so we can create it and try to reproduce same behavioral with Highcharts in our local environment.
Apparently I can't attach sql docs and trying to do so from mobile deletes the chat message (or did for me anyway). Since this is the 2nd time I'm writing this I'll jump more to the point:
The chart is likely going to be impossible for you to reproduce exactly (especially since I can't share sql with you). However, I would hypothesize that any highcharts spline chart made with a datetime column for the x axis will have the same behavior.
If you'd like to see the chart in question, you can make an account at https://moodrecordor.org. It's free and should be straightforward but since we are still developing this, reach out to me if you have any troubles. If you'd like an admin account, let me know when a good time to arrange a call would be and I can walk you through the various layers in use.
To answer your questions:
yes, the table is on the same page as the chart.
yes, follow table filtering is enabled.
Other problems for reproducibility:
This app apparently requires a custom sql view as the wpdatatables plugin causes 500 errors when using more than about 20 columns from the wp database. Additionally the sql generated by the wpdt gui requires editing to change INNER JOIN statements to LEFT JOINs; otherwise no data is displayed and the site also crashes.
Thanks again for the help and let me know if you want me to elaborate on anything!
Then we try to reproduce same behavioral(as from your screenshots from previous posts).
We try to create table with similar data like on your chart and then to create both chart(Google and Highcharts)
This is the table(same data as from your charts)(attach 2)
Then we create a charts with only one differences that we turn on Follow table filtering for Highcharts.
Charts on the page without table.(attach 3)
Charts with filtered table on the page.(attach 4)
So based on this we can say that your table is filtered(with filters in query, or predefined filters or URL filters) and then Highcharts that is connected with this table with Follow table filtering show only that data(not all like is case in Google chart)
If this is not the case then please explain me in little more details and send me some example/screenshot/screencast(video will be the best so we can see exactly on what you mean), so I can give you my suggestion.
About MySQL query constructor:
Please note that MySQL query constructor is not an ‘ultimate generator’, it should be treated as helper for constructing a suggestion of a query, by trying to ‘guess’ what you want. We are constantly working to improve it, but SQL is such a complicated and flexible language that fully automating the process for constructing queries is hardly possible. Consequently, the more complicated your request is, the higher is the probability that it will not return exactly what you need. Play around with the resulting query to achieve better results.
First off, thank you for all the work you're putting into this! I really appreciate the effort to get this issue resolved.
Secondly, I'm so sorry about the link. In my haste, I misttyped the url. It's https://moodrecorder.org, with an "er".
Lastly, it looks like your tests are producing the expected result but are not testing the case I'm trying to solve. Try using that same test but make the time between the dates vary (i.e. not always 1 day apart).
For example, one date could be 7 days ago, the next could be 6 days ago, and the 3rd could be today. The hypothesis is that the distance between the points for t+7d and t+6d is the same as the distance between t+6d and t; while the correct behavior would be for t+7d <-> t+6d (1 day) to be 6 times shorter than t+6d <-> t (6 days). In other words what I'm seeing is that the space between points on the graph is always the same, regardless of the time between those points.
If you want a more detailed explanation, I can record a video but I doubt it's necessary, your test environment is pretty much there.
And yeah, I saw that bit about the mysql query before; I only include the part about LEFT JOINS if you wanted to pass the feedback along to whoever works on that generation :)
The charts can display only what the table displays, so if you're able to generate correct results through the query, the chart would follow that.
This is most likely how the library works, though, but we would need to test it. Can you save the query in a text file, zip it, and send it to us along with the exported database tables that you use? You can attach zip files to tickets, but if the data is sensitive, make sure to enable the PRIVATE response.
Then, you can record a short video, showing us how you're creating the table, how you're creating the chart, and ultimately - what issues you're facing with that approach.
Thanks for the reply and sorry for the late response! My team and I are working to rebuild the table interface and offload the query to another server with it's own database. Once that's done I'll shoot you a link that you should be able to use for replicating the data from a json response along with a video on how to use it and the problems present.
Thanks for your patience while I work through all this :)
Hi,
Could you please provide me with the code for highcharts to parse a wpdatatables datetime column or provide a viable alternative for using dates & times in highcharts?
I have date & time variable data and I cannot find how to get high charts to interpret the wpdatatables datetime column as a time value and not a category. Google charts does a fine job of spacing data according to their respective temporal variances.
Date format is "d Mon Y" and time format is 24hr. All times are in UTC.
Thanks!
Hi Seon,
Thank you for your purchase.
Sorry for the late response, we have some agents that have contracted Covid-19, so our team is cut in half.
Sorry but I did not quite understand what are you trying to achieve. Can you please explain me in little more details and send me some example/screenshot/screencast, so I see on exaclty what you mean and I will give you my suggestion.
Best regards
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hey Milan!
Thanks for getting back to me! No worries on reply time, I'm a bit slow myself these days.
To restate: I want to use highcharts but with a datetime x axis. That's pretty much it. It seems like this should work if I only use date and not time. However, it seems like this "just works" with google charts, the graph is just not as readable as highcharts. I've attached 2 screenshots that might help show what I'm trying to do.
The reason I think this is a TMS thing, rather than just a highcharts thing is because it seems like the "datetime" data type should produce roughly similar behavior across all rendering engines and not be categorical on one engine but temporal on another. With that said, I think the solution will be some highcharts options.
Thoughts?
Here's the code I have so far:
if (typeof wpDataChartsCallbacks == 'undefined') {
console.log("wpDataChartsCallbacks Undefined");
wpDataChartsCallbacks = {};
}
function general_highchart_format_callback(obj) {
console.log("...callback 2 found");
console.log(obj);
obj.options.xAxis.type = "datetime";
obj.options.xAxis.tickInterval = 8640000;
}
wpDataChartsCallbacks[2] = general_highchart_format_callback;
Thanks again for the help!
Hi Seon,
Thank you for understanding.
This is strange, and what can I ask to make this more clear are that Highcharts use Follow table filtering and is table on same page? Like that on Highcharts will show only filtered data from table.
If this is not the case can you pelase provide me a source for this table that is used so we can create it and try to reproduce same behavioral with Highcharts in our local environment.
Best regards
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hey Milan,
Apparently I can't attach sql docs and trying to do so from mobile deletes the chat message (or did for me anyway). Since this is the 2nd time I'm writing this I'll jump more to the point:
The chart is likely going to be impossible for you to reproduce exactly (especially since I can't share sql with you). However, I would hypothesize that any highcharts spline chart made with a datetime column for the x axis will have the same behavior.
If you'd like to see the chart in question, you can make an account at https://moodrecordor.org. It's free and should be straightforward but since we are still developing this, reach out to me if you have any troubles. If you'd like an admin account, let me know when a good time to arrange a call would be and I can walk you through the various layers in use.
To answer your questions:
yes, the table is on the same page as the chart.
yes, follow table filtering is enabled.
Other problems for reproducibility:
This app apparently requires a custom sql view as the wpdatatables plugin causes 500 errors when using more than about 20 columns from the wp database. Additionally the sql generated by the wpdt gui requires editing to change INNER JOIN statements to LEFT JOINs; otherwise no data is displayed and the site also crashes.
Thanks again for the help and let me know if you want me to elaborate on anything!
- Seon
Hi Seon,
We try to access to https://moodrecordor.org but it is not accessible. (attach 1)
Then we try to reproduce same behavioral(as from your screenshots from previous posts).
We try to create table with similar data like on your chart and then to create both chart(Google and Highcharts)
This is the table(same data as from your charts)(attach 2)
Then we create a charts with only one differences that we turn on Follow table filtering for Highcharts.
Charts on the page without table.(attach 3)
Charts with filtered table on the page.(attach 4)
So based on this we can say that your table is filtered(with filters in query, or predefined filters or URL filters) and then Highcharts that is connected with this table with Follow table filtering show only that data(not all like is case in Google chart)
If this is not the case then please explain me in little more details and send me some example/screenshot/screencast(video will be the best so we can see exactly on what you mean), so I can give you my suggestion.
About MySQL query constructor:
Please note that MySQL query constructor is not an ‘ultimate generator’, it should be treated as helper for constructing a suggestion of a query, by trying to ‘guess’ what you want. We are constantly working to improve it, but SQL is such a complicated and flexible language that fully automating the process for constructing queries is hardly possible. Consequently, the more complicated your request is, the higher is the probability that it will not return exactly what you need. Play around with the resulting query to achieve better results.
Best regards
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hey Milan,
First off, thank you for all the work you're putting into this! I really appreciate the effort to get this issue resolved.
Secondly, I'm so sorry about the link. In my haste, I misttyped the url. It's https://moodrecorder.org, with an "er".
Lastly, it looks like your tests are producing the expected result but are not testing the case I'm trying to solve. Try using that same test but make the time between the dates vary (i.e. not always 1 day apart).
For example, one date could be 7 days ago, the next could be 6 days ago, and the 3rd could be today. The hypothesis is that the distance between the points for t+7d and t+6d is the same as the distance between t+6d and t; while the correct behavior would be for t+7d <-> t+6d (1 day) to be 6 times shorter than t+6d <-> t (6 days). In other words what I'm seeing is that the space between points on the graph is always the same, regardless of the time between those points.
If you want a more detailed explanation, I can record a video but I doubt it's necessary, your test environment is pretty much there.
And yeah, I saw that bit about the mysql query before; I only include the part about LEFT JOINS if you wanted to pass the feedback along to whoever works on that generation :)
Thanks again!
- Séon
Hello Seon.
The charts can display only what the table displays, so if you're able to generate correct results through the query, the chart would follow that.
This is most likely how the library works, though, but we would need to test it. Can you save the query in a text file, zip it, and send it to us along with the exported database tables that you use? You can attach zip files to tickets, but if the data is sensitive, make sure to enable the PRIVATE response.
Then, you can record a short video, showing us how you're creating the table, how you're creating the chart, and ultimately - what issues you're facing with that approach.
Thank you in advance!
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
Hey Aleksandar!
Thanks for the reply and sorry for the late response!
My team and I are working to rebuild the table interface and offload the query to another server with it's own database. Once that's done I'll shoot you a link that you should be able to use for replicating the data from a json response along with a video on how to use it and the problems present.
Thanks for your patience while I work through all this :)
- Séon
Hi Séon
Thank you for the update, the entire team is here for you, we will be happy to help whenever you need us
Have a wonderful day!