xamarin 如何增加Synfusion图形值大小?

htrmnn0y  于 2023-04-18  发布在  其他
关注(0)|答案(2)|浏览(111)

我有Xamarin Forms中的Syncfusion line Spline graph:

<chart:SfChart>
<chart:SplineSeries
           ItemsSource="{Binding SymptomDates}"
           XBindingPath="Date"
           YBindingPath="Severity">
</chart:SplineSeries>
</chart:SfChart>

如何增加标签大小?

rekjcdws

rekjcdws1#

正如Jason所暗示的,要增加标签的大小,您可以像下面这样自定义ChartAxisLabelStyle属性的FontSize="25"

<chart:SfChart> 

       <chart:SfChart.PrimaryAxis>

             <chart:CategoryAxis>

                  <chart:CategoryAxis.LabelStyle>
                       <chart:ChartAxisLabelStyle FontSize="25"/>

                  </chart:CategoryAxis.LabelStyle>

             </chart:CategoryAxis>

        </chart:SfChart.PrimaryAxis>
       
</chart:SfChart>
mwg9r5ms

mwg9r5ms2#

您可以使用LabelStyle属性自定义轴标签,并且可以使用FontSize属性增加轴标签的大小。下面,我附上了一个示例以供参考:

<chart:SfChart.PrimaryAxis>
            <chart:DateTimeAxis>

                <chart:DateTimeAxis.LabelStyle>

                    <chart:ChartAxisLabelStyle TextColor="Red" FontSize="10" FontAttributes="Bold"/>

                </chart:DateTimeAxis.LabelStyle>

            </chart:DateTimeAxis>
</chart:SfChart.PrimaryAxis>

参考链接:
https://help.syncfusion.com/xamarin/charts/axis#label-customization www.example.com
注意:在同步融合中工作

相关问题