Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
210
XAxis Font scale
posted

Hi,

 I have a chart (Scatter/Line) and I can't seem to change the size of the font along the xAxis.  It always appears to be very small.  I added a font size parameter to the Axis and it didn't do anything:

<igCA:Axis Name="xAxis" AxisType="PrimaryX" AutoRange="True" StrokeThickness="1" >

<igCA:Axis.Label>

<igCA:Label Format="{}{0:0%}" FontSize="16" ></igCA:Label>

</igCA:Axis.Label>

 

 

</igCA:Axis>

It is not dislaying the 16 pt font, but rather something very small....

 

Thanks,

Steve

Parents
No Data
Reply
  • 739
    posted

     Hi Steve,

    The xamChart has auto resizing algorithm for axis labels to prevent overlapping of labels.   So if there is a risk that labels will overlap, the labels font size will be automatically changed. It will usually happened if the unit value is small and there is not enough space for labels. If you want to disable this auto behaviour, you can use the following code:

    <igCA:Axis Name="xAxis" AxisType="PrimaryX" AutoRange="True" StrokeThickness="1" >
       <igCA:Axis.Label>
          <igCA:Label Format="{}{0:0%}" FontSize="40" AutoResize="False" />
       </igCA:Axis.Label>
    </igCA:Axis>

    The AutoResize property of the label is set to “False” which will prevent overlapping.

    Thanks,

    GoranS

Children
No Data