jQuery UI Widgets Forums Chart Change the name on the axis value

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 11 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Change the name on the axis value #26879

    tranen
    Participant

    Hi,

    I’m using the bubble graph.
    I have this:

    type: ‘bubble’,
    valueAxis:
    {
    unitInterval: 1,
    minValue: 0,
    maxValue: 6,
    description: ‘Level’,
    formatSettings: { prefix: ‘(‘, sufix: ‘)’}
    },

    It will write the value on the axis 0 to 6 but I would like to know if there is a possibility to write name instead.
    For example if 0 = beginner, 1 = medium, 2 = strong
    instead of :
    2|
    |
    1|
    |
    0|——

    it will show:
    strong |
    |
    medium |
    |
    beginner|——-

    is it possible?
    Thanks

    Change the name on the axis value #26885

    Dimitar
    Participant

    Hello tranen,

    Yes, it is possible. To achieve this, please set the formatFunction callback function of valueAxis. Here is an example:

    formatFunction: function (value) {
    if (value < 1) {
    return "beginner";
    } else if (value < 2) {
    return "medium";
    } else {
    return "strong";
    };
    }

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.