Display decimals in flot chart tooltip

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10034765
    fl-330
    Participant

    Hello

    I’m wondering if it’s possible to display decimals in flot chart tooltip

    tooltip: true,
    tooltipOpts: {
    content: '%s: Value of %x is %y',
    ...

    Actually variable %y is rounded to upper value, I need it to be a decimal.

    Thanks for you help.

    Best regards



    Template Version: 2.1.1
    #10034769
    Support
    Keymaster

    Hello,

    You can use the option tickDecimals inside yaxis and xaxis. For example:

    .......
    ...........
    ........
    .................
    	backgroundColor: 'transparent'
    },
    yaxis: {
    	min: 0,
    	max: 150.77,
    	color: 'rgba(0,0,0,0.1)',
    	tickDecimals: 2
    },
    xaxis: {
    	color: 'rgba(0,0,0,0.1)',
    	tickDecimals: 2
    },
    tooltip: true,
    tooltipOpts: {
    	content: '%s: Value of %x is %y',
    	shifts: {
    .......
    .............
    .....

    Please try that and let us know if you need further assistance.

    Kind Regards,

    Rodrigo.


    If you are satisfied with Porto Admin and our support, please leave your comment and rating on ThemeForest downloads page. That helps us a lot: https://themeforest.net/downloads


    #10034772
    fl-330
    Participant

    Hi Rodrigo

    It works.
    Thanks again for your great support.

    Best regards

    Adel


    #10034775
    Support
    Keymaster

    Hello Adel,

    Great! 🙂

    If you need further help feel free to contact us.

    Kind Regards.

    Rodrigo.


    If you are satisfied with Porto Admin and our support, please leave your comment and rating on ThemeForest downloads page. That helps us a lot: https://themeforest.net/downloads


Viewing 4 posts - 1 through 4 (of 4 total)

This topic is marked as "RESOLVED" and can not rceive new replies.