Hey everyone!

With the holiday season upon us, we want to share our upcoming working hours:

After that, we’ll return to our regular schedule and assist you as quickly as possible.

In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find tons of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel), which might just have the answers you need while we’re away.

Thanks a bunch for your understanding and support!

Warm regards and happy holidays!

TMS

Okay
  Public Ticket #3498899
Cumulative Data on Chart
Closed

Comments

  • Jereme Downs started the conversation

    Hi.  I have a data table that has a date and an amount - i.e. 9/23/23, $10 and 10/10/23, $20.  I need to display the amounts in a chart as cumulative, so for 9/23/23 the amount would be $10, and for 10/10/23 the amount would be $30, but somehow still be able to see what the amount is for that day (whether via a tooltip or on the axis, etc).  Is this a setting in the chart I need to set to get this result?

    Also, these two dates in my data table (09/23/2023 and 10/10/2023) show correctly when I set the column type to text.  If I set it to date, the 9/23/23 is displayed as 01/01/1970.  I'm guessing it thinks the month is 23 and the day is 9, but I have the date format set to m/d/Y in the plugin settings.  

  •  1,847
    Miloš replied

    Hello Jereme,

    To begin, I want to extend my heartfelt apologies for the delayed reply, 

    which is due to an unexpectedly high volume of inquiries. 

    We truly value your patience during this period.

    -

    If i understood what you described as the first point, you wish for the chart to somehow add each next amount from the next Date of your X axis together with the previous ones, so the first Date as you described has 10$  then a second Date in the Table row has 20$  but you want the Chart to keep adding them up for each date as accumulated values?

    I am truly sorry to disappoint you, but at the moment this is not possible with any of our built-in functionalities.

    You can only try to achieve this with some custom Chart Hook, which will not be covered by our Support.


    If you have coding skills or your own developer and wish to try with a custom solution, you can check our documentation about wpDataCharts callbacks

    On this Documentation you will find our devs made one custom example for each Chart Engine, then you will need to modify it in order to get the options you need on the chart.

    • 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 APIHighcharts 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 the Support help center). A 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 a certain level of programming skills and included support refers only to advice.



    2. Yes, this can happen if your Date Format is not matching up somewhere, either on your Source Data or in the Plugin or in the Date column itself.

    So please check in your Source Data, for example if it's CSV/Excel/Google Sheet or similar, if you formatted those values in the Date Column, please unformat them and just use 'unformatted values' on the source,

    then check in the Main Plugin settings if you set the same Date Format,  and in the Column settings of the Table, check in the Date Format if it is the same as well?

    I hope that helps.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia 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

  • Jereme Downs replied

    Thanks for the info!  I couldn't get this to work with the proper hook settings, however I was able to get the results I needed simply by adding an extra column to my SELECT statement if anyone else is looking to do the same thing:

    FORMAT(SUM(amount) OVER(ORDER BY payment_date), 2) as cumulative_amount

  •  1,847
    Miloš replied

    Hello Jereme,

    Just following up.

    Thank you very much for sharing the workaround with us. We made a note of it and other users can also find it on this public ticket.

    Thanks again.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia 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