Jump to content
JChartFX Community
  • 0

Line looks ok, Curve not


Question

Hi,

I have created a combined chart using the JSON below. First I made a Curve chart, it looks incorrect and then a Line chart which looks ok.

[

    {

        "Date": " 10:00",

        "MY-VAIO": 4107,

        "COMPLETED": 42

    },

    {

        "Date": " 11:00",

        "MY-VAIO": 4478,

        "COMPLETED": 59

    },

    {

        "Date": " 12:00",

        "MY-VAIO": 4246,

        "COMPLETED": 61

    },

    {

        "Date": " 13:00",

        "MY-VAIO": 4074,

        "COMPLETED": 59

    },

    {

        "Date": " 14:00",

        "MY-VAIO": 4003,

        "COMPLETED": 60

    },

    {

        "Date": " 15:00",

        "MY-VAIO": 3981,

        "COMPLETED": 60

    },

    {

        "Date": " 16:00",

        "MY-VAIO": 4217,

        "COMPLETED": 60

    },

    {

        "Date": " 17:00",

        "MY-VAIO": 5024,

        "COMPLETED": 60

    },

    {

        "Date": " 18:00",

        "MY-VAIO": 2043,

        "COMPLETED": 4

    },

    {

        "Date": " 19:00",

        "MY-VAIO": 3265,

        "COMPLETED": 13

    },

    {

        "Date": " 21:00",

        "MY-VAIO": 45770,

        "COMPLETED": 223

    },

    {

        "Date": " 22:00",

        "MY-VAIO": 5427,

        "COMPLETED": 19

    }

 

for some reason the Curve chart enter negatives territory, but it should not.

 

Curve Chart 

 

 ... while the Line chart looks ok

 

Line Chart 

 

Is there any way of correcting the Curve chart?

 

Thanks! 

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

There is no way of correcting this, unfortunately in order to draw a smooth curve that passes exactly through the points, most algorithms (including the one we use) have to adjust the pixels painted before and after points.

I am attaching the same data plotted in Excel 2013, you will notice that the curve also seems to be slightly negative before the point labeled 10

 

JuanC

 BzKa4aCDKFvGAAAAAElFTkSuQmCC

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...