I'm building our first table & graph from a CSV data source. The table loads on the page just fine and the data looks correct. However, when building the graph the imported CSV datatype of string must be set to a non-string datatype so it can be graphed. The converted value in the table is becomes incorrect. Examples below.
Original CSV string: 1.74 becomes 174 when converted to float
Original CSV string: 0.174 becomes 174 when converted to integer
Original CSV string: 0.0174 becomes 174 when converted to float
Original CSV string: 0.0174 becomes 174,00 when converted to float + 2
Every chart exposes several options that customize its look and feel. Charts usually support custom options appropriate to that visualization. wpDataChart callbacks allow adding options that are available in Google Charts API, Highcharts API and Chart.js API.
All necessary resources are available in charts engines API (depends on which one you use). Every engine has a different approach to chart settings. In wpDataChart callbacks you have to adopt those settings to the wpDataChart object (you can take a look at examples for each engine in our documentation, and also in Support help center). Huge number of examples for any area of programming can be found on stackoverflow.com (typing your problem in google and at the end add "site: stackoverflow.com" and google will search only that website). Also, a lot of examples of charts, chart settings and customization can be found on jsffidle.net (typing in google for example "line chart highcharts jsffidle")
Please note that using hooks or wpdatatable and wpDataChart callbacks requires certain level of programming skills and included support refers only to advice.
So you are telling me that the number 0.174 in a table cannot be represented as 0.174 on a bar chart until we hire a developer to write custom code?
A bar chart allows only a single column to be a string, the others must be numeric. The TMS conversion from 0.174 string to 0.174 float fails and the conversion becomes 174.00 float. This seems like a bug.
I can take a look at your table and your chart, but I doubt there's a solution to this other than using the callback.
Chart engines we use (they're not ours) do not inherit the number format from wpDataTables, so if your table is showing the correct format, and it breaks or displays a different format in the chart - you need to change the format using callbacks.
Tell me what are the table's and the chart's IDs and I'll take a look.
Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party.
You can write credentials here just check Private Reply so nobody can see them except us.
I guess I'm not being very clear, sorry. This is a data load into the table issue where the initial loading of data from a CSV is being converted to a FLOAT and the values are being changed to incorrect values. I've attached two files to help.
The first file is an image of the Excel source data that gets saved in CSV format.
The second file is the result of loading the CSV into a table.
Notice that the values in the table are quite different than the source. 0.174 becomes 174,00.
Sorry for not being clearer, hope it helps.
Logging into the website will only show a working table and a working chart that are masking the underlying data issue since the values in the table & chart look good but are incorrect.
You need to configure the number format in wpDataTables to be the same as it is in Excel.
Since the decimal separator in Excel is a point, not a comma, and due to the fact that you have 3 decimal places in there, you need to set up the same format in wpDataTables settings:
I'm building our first table & graph from a CSV data source. The table loads on the page just fine and the data looks correct. However, when building the graph the imported CSV datatype of string must be set to a non-string datatype so it can be graphed. The converted value in the table is becomes incorrect. Examples below.
Original CSV string: 1.74 becomes 174 when converted to float
Original CSV string: 0.174 becomes 174 when converted to integer
Original CSV string: 0.0174 becomes 174 when converted to float
Original CSV string: 0.0174 becomes 174,00 when converted to float + 2
Thanks for the help
Hello Gary
Thank you for your purchase.
If I understood correctly, the data in the table is fine, but it's not coming out fine in the chart?
If that's true, that's because chart engines do not inherit number format from wpDataTables.
To change the format, you will need to use wpDataCharts callbacks.
Take a look at this page in our FAQ section - it shows how you can change the format.
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
So you are telling me that the number 0.174 in a table cannot be represented as 0.174 on a bar chart until we hire a developer to write custom code?
A bar chart allows only a single column to be a string, the others must be numeric. The TMS conversion from 0.174 string to 0.174 float fails and the conversion becomes 174.00 float. This seems like a bug.
Surely there is a better solution.
Thanks
I can take a look at your table and your chart, but I doubt there's a solution to this other than using the callback.
Chart engines we use (they're not ours) do not inherit the number format from wpDataTables, so if your table is showing the correct format, and it breaks or displays a different format in the chart - you need to change the format using callbacks.
Tell me what are the table's and the chart's IDs and I'll take a look.
Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party.
You can write credentials here just check Private Reply so nobody can see them except us.
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 guess I'm not being very clear, sorry. This is a data load into the table issue where the initial loading of data from a CSV is being converted to a FLOAT and the values are being changed to incorrect values. I've attached two files to help.
The first file is an image of the Excel source data that gets saved in CSV format.
The second file is the result of loading the CSV into a table.
Notice that the values in the table are quite different than the source. 0.174 becomes 174,00.
Sorry for not being clearer, hope it helps.
Logging into the website will only show a working table and a working chart that are masking the underlying data issue since the values in the table & chart look good but are incorrect.
Thx,
Gary
Hey Gary
You need to configure the number format in wpDataTables to be the same as it is in Excel.
Since the decimal separator in Excel is a point, not a comma, and due to the fact that you have 3 decimal places in there, you need to set up the same format in wpDataTables settings:
After that, it should work fine.
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
Hi Aleksandar,
Changing the default settings worked perfectly..! Thanks so much for your helpful suggestions. Everything works and looks perfect now.
Ticket resolved, OK to close.
Thanks again,
Gary
You're welcome Gary
Glad I could be of service
If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.
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