score:1
Wergeld's answer is correct,but I've found another solution.
We can extend YAxisTitle using inheritance and add property UseHtml.
public class YAxisTitleExtend : YAxisTitle
{
public bool? UseHTML { get; set; }
}
And using YAxisTitleExtend instead of YAxisTitle.
If another not explicitly properties have appeared,we can simply add theirs to extend class.
score:1
Looking at the API docs for HighCharts the xAxis
and yAxis
titles do not have the property to use HTML. However, it is still present:
yAxis: {
title: {
text: 'СН<SUB>3</SUB>СНО',
useHTML: true,
style: {
color: 'red'
}
}
}
The DotNet.Highcharts API only exposes items that are in the HighCharts API explicitly. This is one of the reasons we stopped using it. You could add an event in the chart.events.load
section to set the axis title useHTML
property:
chart: {
events: {
load: function (event) {
this.yAxis[0].setTitle({
useHTML: true,
});
}
}
},
yAxis: {
title: {
text: 'СН<SUB>3</SUB>СНО'
}
}
Live demo of using load
event.
Source: stackoverflow.com
Related Articles
- UseHTML property in XAxisTitle or YAxisTitle
- Strange character in the Highstock source code
- SyntaxError: JSON.parse: expected property name or '}' while using highcharts
- R Highcharter Sankey nodes column property trouble
- Highcharts.js will not render the chart, it says error "Cannot read property 'series' of undefined"
- Optimize JavaScript DrillDown code
- Highcharts: show stack total in shared tooltip, via footerFormat property
- highcharts-angular : Cannot read property 'chart' of undefined
- Uncaught TypeError: Cannot read property 'mouseIsDown' of undefined
- Highcharts: Cannot read property 'parts/Globals.js' of undefined
- Replacing highcharts.each in my code as it is being deprecated
- ERROR TypeError: Cannot set property 'proceed' of undefined
- Highcharts cannot read property 'series' of undefined
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Code works on fiddle but not when I do /show
- Highcharts - Global configuration with common code and unique data & Headings
- ERROR TypeError: Cannot read property '0' of undefined in angular-highcharts
- JavaScript code inside TypeScript file .ts not working
- Error: Template parse errors: Can't bind to 'options' since it isn't a known property of 'chart'
- allowOverlap property for Highcharts JS v3.0.10
- Cannot read property 'addEvent' of undefined
- Issues with xAxis labels and useHTML #1
- How do you set the text-overflow property of a highcharts-legend-item to ellipsis in styled mode?
- rerender view when model property change in EmberJS
- Uncaught TypeError: Cannot read property 'chart' of undefined in highcharts
- HighCharts Stock Chart error code 18
- Getting the complete XML source out of an XML DOM object
- Is there any way to assign "Alt" property while using Highcharts
- Highmaps: what is the code for a county?
- Getting error 'Cannot read property 'document' of undefined' while importing exporting.js (to export highchart charts)
- How Can we display a legend in high chart that contains apostrophe
- Different color for different data labels
- react-highcharts how to call reflow?
- jQuery detach() v/s remove() v/s hide()
- Highcharts change line style after intersect
- Display HH:MM on y axis highcharts
- How do you set the text-overflow property of a highcharts-legend-item to ellipsis in styled mode?
- How to fix "Property 'type' is missing in type but required in type 'SeriesXrangeOptions'" in angular highcharts module
- To store date after using afterSetExtremes of Highcharts.stock
- Multiple different chart types stacked, column type with y value as color
- Change window position with button HighStocks
- Highcharts xAxis datetime from start
- Highcharts, add 'go back' (drill up) button when drill
- Unpredictable behavior of y-axis labels of Highchart
- How do you save a Highcharter chart as a gif in R?
- R highcharter legend based on point color
- Highcharts - How to set custom colors for the series
- Add null values to Array Javascript
- Highcharts sparse data - hide empty values
- Highcharts Maps Drilldown Map From geojson