Search code examples
c#highchartsdotnethighcharts

UseHTML property in XAxisTitle or YAxisTitle


Class Title of DotNet.Highcharts has property UseHtml,but I can't find the same property in class XAxisTitle and YAxisTitle.

How can I display html text(for example СН3СНО) in yaxis or xaxis title.


Solution

  • 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.