我正在制作visifire的条形图,我想制作一个自定义图例。 我已经实现了自定义图例,但我希望将其垂直堆叠。
这是我的代码:
<visifire:Chart.PlotArea>
<visifire:PlotArea ShadowEnabled="false"></visifire:PlotArea>
</visifire:Chart.PlotArea>
<visifire:Chart.Legends>
<visifire:Legend x:Name="Legend0" Height="30" Width="50" HorizontalAlignment="Right" VerticalAlignment="Top" EntryMargin="5"
FontSize="10" FontWeight="Bold" ShadowEnabled="False" BorderThickness="0" Background="Transparent" LightingEnabled="False" />
</visifire:Chart.Legends>
<visifire:Chart.Series>
<visifire:DataSeries RenderAs="Column" LabelEnabled="True" Margin="-1,0,1,0" ShowInLegend="True" HorizontalAlignment="Right" VerticalAlignment="Top" LegendText="Candidates" DataSource="{Binding PositionLevelRecruitmentList}">
<visifire:DataSeries.DataMappings>
<visifire:DataMapping MemberName="AxisXLabel" Path="FullCodeAndLevel"></visifire:DataMapping>
<visifire:DataMapping MemberName="YValue" Path="ApplicantCount"></visifire:DataMapping>
</visifire:DataSeries.DataMappings>
</visifire:DataSeries>
<visifire:DataSeries RenderAs="Column" LabelEnabled="True" Margin="5,0,1,0" ShowInLegend="True" HorizontalAlignment="Right" VerticalAlignment="Top" LegendText="Required" DataSource="{Binding PositionLevelRecruitmentList}">
<visifire:DataSeries.DataMappings>
<visifire:DataMapping MemberName="YValue" Path="RequiredCount"></visifire:DataMapping>
</visifire:DataSeries.DataMappings>
</visifire:DataSeries>
<visifire:DataSeries RenderAs="Column" LabelEnabled="True" Margin="5,0,1,0" ShowInLegend="True" HorizontalAlignment="Right" VerticalAlignment="Top" LegendText="Fulfilled" DataSource="{Binding PositionLevelRecruitmentList}">
<visifire:DataSeries.DataMappings>
<visifire:DataMapping MemberName="YValue" Path="FulfilledCount"></visifire:DataMapping>
</visifire:DataSeries.DataMappings>
</visifire:DataSeries>
</visifire:Chart.Series>
</visifire:Chart>
答案 0 :(得分:1)