Silverlight Toolkit Chart Y-axis label styling -
i having trouble figuring out how style y-axis labels on chart (silverlight toolkit). have simple example of how this? examples out in wild seem pre 2010, when chart api different.
thanks,
mike
here's sample code changes y-axis display labels in hours instead of minutes , changes font size 8 (secondstohours converter code not included). can lots of other kinds of formatting in style. should started.
<style x:key="hourslabel" targettype="{x:type charting:axislabel}"> <setter property="template"> <setter.value> <controltemplate targettype="{x:type charting:axislabel}"> <textblock text="{binding converter={staticresource secondstohoursconverter}}" fontsize="8" /> </controltemplate> </setter.value> </setter> </style> <charting:chart.axes> <charting:linearaxis orientation="y" interval="1" minimum="0" maximum="24" axislabelstyle="{staticresource hourslabel}" /> </charting:chart.axes>
Comments
Post a Comment