Home forums Using CanvasJS html dir="rtl" – chart not displayed

This topic contains 2 replies, has 2 voices, and was last updated by  Anjali 1 year, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8076

    santa
    Participant

    Hello,

    i am trying to print a stacked bar column chart in arabic language mode.
    when <html dir=”rtl”>
    </html> , the chart is not displayed. instead, the link canvasjs.com is displayed on the screen. please advise

    #8079

    santa
    Participant

    please find below the code snippet:

    <!DOCTYPE HTML>
    <html dir=”rtl”>
    <head>
    <script type=”text/javascript”>
    window.onload = function () {
    var dps = [{y: 500, label: “Structural”}, {y: 300, label: “Civil”}, {y: 1800, label: “Architects”}];

    var dps1 = [{y: 2000, label: “Structural”}, {y: 500, label: “Civil”}, {y: 300, label: “Architects”}];
    var sliceval = 2000/5;
    CanvasJS.addColorSet(“greenShades”,
    [//colorSet Array

    “#B378D3”,
    “#800080”
    ]);

    var chart = new CanvasJS.Chart(“chartContainer”,
    {
    colorSet: “greenShades”,

    title:{
    text: “Dashboard”
    },
    axisX:{
    title: “Employee Groups”,
    labelAngle: -50,
    gridColor: “lightblue”
    },
    axisY:{
    title: “Applications”,
    interval: sliceval,
    gridColor: “lightgreen”
    },
    data: [
    {
    type: “stackedColumn”,
    legendText: “On time”,
    indexLabel: “{y}”,
    showInLegend: “true”,
    labelAutoFit: “true”,
    indexLabelPlacement: “inside”,
    indexLabelFontColor: “white”,
    dataPoints: dps
    },
    {
    type: “stackedColumn”,
    legendText: “Delayed”,
    showInLegend: “true”,
    indexLabel: “{y}”,
    labelAutoFit: “true”,
    indexLabelPlacement: “inside”,
    indexLabelFontColor: “white”,
    dataPoints: dps1
    }
    ]
    });
    chart.render();
    }
    </script>
    <script type=”text/javascript” src=”canvasjs.min.js”></script></head>
    <body>
    <div id=”chartContainer” style=”height: 300px; width: 100%;”></div>
    </body>
    </html>

    #8086

    Anjali
    Participant

    santa,

    rtl support is not available yet in CanvasJS.

    __
    Anjali

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

You must be logged in to reply to this topic.