维西火查询

发布于 2024-11-25 03:38:12 字数 2813 浏览 0 评论 0原文

我正在 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>

I am making a bar graph in visifire and I want to make a custom legend.
I already achieved the custom legend but I want to stack it vertically.

Here is my code:

                    <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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文