C# – HighCharts to support RTL

cdotnethighchartshighchartsright-to-left

Highcharts does not support rtl be default.
When placing rtl texts like hebrew/arabic the text is completely destroyed, making it sometimes unreadable.
How do I configure HighCharts to support RTL?

I am using the dotnetHighCharts if it helps…

Best Answer

try this code: Demo

var chart = new Highcharts.Chart({

chart: {
    style:{
    direction: 'rtl'
    },
    renderTo: 'container',
    type: 'column'
},

xAxis: {
    categories: [
         ' تست a', 
        'حسن', 
        'كريم', 
        'محمود'
    ],
    reversed: true
},

yAxis: {

    labels: {
         useHTML: true,
            format: '{value} متر مربع'
        },
    title: {
        text: 'الاسم الأول',
        useHTML: true
    },
},
title: {
    text: 'تست a',
   useHTML: true
},

legend: {
    useHTML: true
},    

tooltip: {
   useHTML: true

},

series: [{
    name: 'تست',
    data: [10000,30000,20000,40000]

}]});
Related Topic