This is a migrated thread and some comments may be shown as answers.

Format individual axis item label

2 Answers 22 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 06 Nov 2013, 02:47 PM
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 Answers, 1 is accepted

Sort by
0
Stamo Gochev
Telerik team
answered on 11 Nov 2013, 11:39 AM
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.

Regards,
Stamo Gochev
Telerik
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.
0
Tony
Top achievements
Rank 1
answered on 21 Nov 2013, 10:25 AM
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');
    });
</script>
Tags
Chart (HTML5)
Asked by
Tony
Top achievements
Rank 1
Answers by
Stamo Gochev
Telerik team
Tony
Top achievements
Rank 1
Share this question
or