Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Custom Label

$
0
0
Hello,

The Series' labels can be customized through Label Definitions. However the Series.LabelDefinitions property does not have a setter and therefore it cannot be set through a style. For this reason, the ChartSeriesDescriptor(in this case the CategoricalSeriesDescriptor) exposes an entry point where you can modify the series as per your needs. You can override its CreateInstanceCore method and get the generated series. For example:

public class CustomDescriptor : CategoricalSeriesDescriptor
{
    protected override ChartSeries CreateInstanceCore(object context)
    {
        var series = base.CreateInstanceCore(context);

             //customize the series
        //series.LabelDefinitions.Add(new ChartSeriesLabelDefinition(){ .....});
 
        return series ;
    }
}

I hope this helps.

Regards,
Ivaylo Gergov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 

Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>