Jump to content
JChartFX Community
  • 0

Want to show the actual value in tooltip


naveen
 Share

Question

Hi,

I am passing the data  as 

data = [

    {

        Date: "Aug 24",

        Volume: 83.428,

        Transfers: 44.211

    },

    {

        Date: "Aug 25",

        Volume: 87.158,

        Transfers: 45.669

    },

    {

        Date: "Aug 26",

        Volume: 85.762,

        Transfers: 45.089

    },

more...

Here, I am showing the Yaxis in thousands for Volume and Transfers. But, I want to show the actual value of Volume and Transfers in tooltip when mouse over on the chart.(Eg: 85762 and 45089).

Now its showing the Yaxis value in the tooltip as 85.762 and 45.089. Could you please help me to show the actual value in the tooltip?

Thanks,

Naveen Kumar P 


Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Unfortunately we do not have a property that allows you to change the scale used for the labels without affecting the tooltops, I would recommend you set your data with "real" numbers, e.g. 85762 (instead of 85.762) and handle the Y axis label event to format the labels, e.g

    chart1.getAxisY().setNotify(true);

    chart1.on("getaxislabel", onAxisYLabel);

function onAxisYLabel(args) {

    var number = parseFloat(args.getText());   

    args.setText(number / 1000);

} 

Regards,

JuanC 

Link to comment
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...
 Share

×
×
  • Create New...