score:0
you can set direction ltr
Sample:
<div id="container" style="direction: ltr"></div>
score:0
In the options there is a property: "useHtml": true and if you need in the title you can add style: { direction: rtl } it works!
score:0
only
title: {
text: 'یک نمودار؟!',
useHTML: true,
},
legend: {
rtl: true,
},
will do the job for you.
score:3
You can use of a RLE
(Start of right-to-left embedding) control character in text. be like this:
format: '\u202B' + '{point.name}'
Sample code:
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'pie'
},
title: {
text: 'یک نمودار؟!',
useHTML: true, //bug fixed `IE9` and `EDGE`
style: {
fontSize: '20px',
fontFamily: 'tahoma',
direction: 'rtl',
},
},
tooltip: {
useHTML: true,
style: {
fontSize: '20px',
fontFamily: 'tahoma',
direction: 'rtl',
},
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
y: -5, //Optional
format: '\u202B' + '{point.name}', // \u202B is RLE char for RTL support
style: {
fontSize: '15px',
fontFamily: 'tahoma',
textShadow: false, //bug fixed IE9 and EDGE
},
},
},
},
series: [{
name: 'برند',
colorByPoint: true,
data: [{
name: 'اینترنت اکسپلورر؟!',
y: 56.33
}, {
name: 'کروم؟!',
y: 24.03,
}, {
name: 'فایرفکس؟!',
y: 10.38
}, {
name: 'سفاری؟!',
y: 4.77
}, {
name: 'اوپرا؟!',
y: 0.91
}, {
name: 'دیگر؟!',
y: 0.2
}],
}],
});
Completed code see in here online: https://jsfiddle.net/NabiKAZ/h4kv0t9v/4/
score:5
I think, this may be helpful:
In general, useHTML for all labels etc. is recommended.
score:12
Just add useHTML: true
to plot options of your chart.
See demo here jsfiddle.net/3me9h7k2
or
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'pie'
},
title: {
text: 'یک نمودار؟!',
useHTML: true, //bug fixed `IE9` and `EDGE`
style: {
fontSize: '20px',
fontFamily: 'tahoma',
direction: 'rtl',
},
},
tooltip: {
useHTML: true,
style: {
fontSize: '20px',
fontFamily: 'tahoma',
direction: 'rtl',
},
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
y: -5, //Optional
format: '\u202B' + '{point.name}', // \u202B is RLE char for RTL support
style: {
fontSize: '15px',
fontFamily: 'tahoma',
textShadow: false, //bug fixed IE9 and EDGE
},
useHTML: true,
},
//showInLegend: true,
},
},
series: [{
name: 'برند',
colorByPoint: true,
data: [{
name: 'اینترنت اکسپلورر؟!',
y: 56.33
}, {
name: 'کروم؟!',
y: 24.03,
}, {
name: 'فایرفکس؟!',
y: 10.38
}, {
name: 'سفاری؟!',
y: 4.77
}, {
name: 'اوپرا؟!',
y: 0.91
}, {
name: 'دیگر؟!',
y: 0.2
}],
}],
});
score:14
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]
}]});
Source: stackoverflow.com
Related Query
- HighCharts to support RTL
- highcharts dataLabels support RTL with enable hover it for show tooltip
- Are there better interface to add Highcharts support to Zeppelin
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Highcharts - Global configuration with common code and unique data & Headings
- HighCharts Stock Chart error code 18
- highcharts change rendered image source on click
- How do i add mouse wheel code in Angular2 highcharts in typescript
- how to display 2 same highcharts without duplicate the code
- Use of DotNet HighCharts dll to make charts in code behind
- How to edit tooltip in Highcharts C# code
- what means ${demo.css} in example files of highcharts ? That piece of code seems to be literal
- passing json values to highcharts from .net code behind
- how to use highcharts tooltip formatter in python code
- passing formatting JavaScript code to HighCharts with JSON
- Highcharts version 8.2.0 tilemap doesn't support "square" shape
- Highcharts display label for pie chart using html table as data source
- Simple, Open source PHP wrapper for Highcharts library
- Is there support for subplots in highcharts as in plotly?
- Add Source to Highcharts Export CSV
- Include additional highcharts source data in angular2 app
- Highcharts custom animation support
- Conditions within highcharts code
- Strange character in the Highstock source code
- What's the code in Highcharts such that the bars (columns) in the same group use the same color?
- Highcharts IE10 support
- Highcharts series visibility with csv data source
- HTML table as data source for highstock charts using highcharts
- Including source for Alchemy js breaks Highcharts js
- Highcharts SVG Export from Python Server Side Code
More Query from same tag
- HighCharts: One Legend, Two Charts
- Stock Highcharts date format
- How to enable y-axis panning while zoom in highcharts?
- highchart axis label can't set at beginning of the label?
- stepped color shading in highcharts doughnut chart
- Convert bar bullet chart into column chart
- Highcharts how to pass data from server into chart
- Uncaught Highcharts error #19: www.highcharts.com/errors/19
- Highcharts make percentage column chart
- How to sort the yaxis in descending order if tickpositions in highcharts are used?
- Highcharts: how to change "overscroll" parameter on "afterSetExtremes" even?
- Highcharts Scatter plot - Add series from database as a different color
- Wrong date in tooltip in charts with daylight savings time in highcharts
- HighChart 'tooltip' object is not found on the very next line in IE8
- How to scale Highcharts height on window resize with React
- highcharts piechart - small number of colors
- How can I avoid moving flags when mouseovered - highcharts
- How make to fill space after column was hidden in column chart using highchart?
- highcharts - changing color of area depending on y-value
- Highcarts - Have datetime xaxis start on certain month
- highstock tough scrolling
- Highcharts bar chart with bar colored based on value
- Possible to use xAxis with type "datetime" and yAxis with categories?
- Date becomes incorrect in the ALL view on Highstock chart?
- Angular 7 High Charts Stock Chart Datetime X Axis tooltip formatting independently of other tooltips
- Highcharts two date compare
- Highcharts Gantt avoid overlapping tasks
- Starting node http server at any free port
- Highcharts context menu causes chart to disappear on return from print screen only on Chrome
- compress x axis in high chart