Home forums Using CanvasJS Displaying every word in label of x-Axis on new line

This topic contains 1 reply, has 2 voices, and was last updated by  Sunil Urs 3 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5478

    anju_k
    Participant

    code snippet:-
    dataPoints: [
    { x: 10, y: 71,label:”Try Alpha 1″, },
    { x: 20, y: 55,label:”Try Alpha 2″,},
    { x: 30, y: 50,label:”Try Alpha 3″, },
    { x: 40, y: 65,label:”Try Alpha 4″, },
    { x: 50, y: 95,label:”Try Alpha 5″, },
    ]

    How to show every word of “Try Alpha 1” on new line. Like:-

    Try
    Alpha
    1

    #5480

    Sunil Urs
    Keymaster

    You can use labelMaxWidth property of axisX/axisY. Below is an example.

    http://jsfiddle.net/canvasjs/UJD3f/

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

You must be logged in to reply to this topic.