Okay
  Public Ticket #1866525
(2) Chart JS Linechart not handling negative values?
Closed

Comments

  •  1
    Willem started the conversation

    Dear Bogdan,

    I've followed up on your advise to edit

    wp-content/plugins/wpdatatables/source/class.wpdatachart.php

    wp-content/plugins/wpDataTables/assets/js/wpdatatables/wdt.chartJS.js and 

    wp-content/plugins/wpDataTables/assets/js/wpdatatables/wdt.chartWizard.js 

    As mentioned in : https://tmsplugins.ticksy.com//ticket/1755720/

    I see there are issues with this approach:

    When more than one line is plotted, the scaling of the Y-axis is subject to two scales instead of one. This means that values on the Y-axis do not correspond correctly with actual values of the lines. I noticed this when I use data has that one line with some strong negative outliers vs another line with similar shape, but less strong negative outliers. I see that the line with smaller values, but stronger outliers, is displayed above a line with lower values, but less strong outliers.

    So: LineOne@0 = -100, LineTwo@0 = -50, LineOne@1 = 10, LineTwo@1 = 20 --> results in: LineOne displayed above LineTwo @ time 1. Which is incorrect.

    When I click in the legend on one of the labels of the lines, the scaling of the Y-axis is fine.

    I realized that this had to do with your suggestions, as this issue is not present when using the original files.

    Unfortunately, that still doesn't solve the initial problem: Negative values are cut-off from the chart due scaling limited to 0. 

  •  1
    Willem replied

    Example

  •  1
    Willem replied

    The issue was that I had selected Stacked Area chart by accident. Apologies..!  Please close

  •  2,572
    Aleksandar replied

    Not a problem Willem.

    We will close this ticket.

    Thanks for letting us know.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    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