Format individual axis item label

3 posts, 0 answers
  1. Tony
    Tony avatar
    13 posts
    Member since:
    Dec 2011

    Posted 06 Nov 2013 Link to this post

    Now I need to apply a CSS class to one of the axis labels, e.g. set a label to bold

    What is the recomended method for doing this?

  2. Stamo Gochev
    Stamo Gochev avatar
    157 posts

    Posted 11 Nov 2013 Link to this post

    Hi Tony,

    The configuration you mentioned is not supported in RadHtmlChart. In general, the chart treats its labels as a whole collection and applies the LabelsAppearance settings to all of them, so we cannot take control over one label. You can find how to "bold" all labels in this help article if this is applicable in your case.

    Stamo Gochev
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tony
    Tony avatar
    13 posts
    Member since:
    Dec 2011

    Posted 21 Nov 2013 Link to this post

    Thanks for your answer but I do need to format an individual label.

    In-case this helps anyone else I have now done this via jquery, in the example below I'm setting a label with a particular date to bold:

    <script type="text/javascript">
        $(document).ready(function() {
            $("#<%= RadHtmlChart1.ClientID%>").find("text").filter(function() { return $(this).text() === "25/12/2013"; }).css('font-weight', 'bold');
Back to Top