0

このコードは軸線を 0.2 刻みで表示していますが、このグループの患者の日数を示しているため、あまり役に立ちません。.2 の原因となるものは何も表示されません。おそらく何かが表示されるか、エラーがどこにあるのでしょうか?

<Button x:Class="OTFDashboard.Common.Modules.MissedMedications.Views.MedicineTileView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
        xmlns:vc="clr-namespace:Visifire.Charts;assembly=WPFVisifire.Charts"
        mc:Ignorable="d"
        d:DesignHeight="300"
        d:DesignWidth="300"
        MinHeight="{StaticResource TileMinHeight}"
        MinWidth="{StaticResource TileMinWidth}"
        MaxHeight="{StaticResource TileMaxHeight}"
        MaxWidth="{StaticResource TileMaxWidth}"
        Command="{Binding Command}"
        Template="{StaticResource TileControlTemplate}">
    <StackPanel Orientation="Vertical"
                dx:ThemeManager.ThemeName="Office2007Blue">
        <vc:Chart x:Name="MedicineChart"
                  Watermark="False"
                  Width="Auto"
                  Height="Auto"
                  VerticalContentAlignment="Stretch"
                  HorizontalContentAlignment="Stretch"
                  HorizontalAlignment="Stretch"
                  VerticalAlignment="Stretch"
                  MinHeight="200"
                  MinWidth="{StaticResource ChartMinWidth}"
                  CornerRadius="15,15,15,15"
                  RenderTransformOrigin="0.5,0.5"
                  FontSize="8"
                  Background="Transparent">
            <vc:Chart.PlotArea>
                <vc:PlotArea Background="#00000000" />
            </vc:Chart.PlotArea>
            <vc:Chart.Titles>
                <vc:Title Text="Number of patients who Missed Medications" />
            </vc:Chart.Titles>
            <vc:Chart.AxesX>
                <vc:Axis IntervalType="Days"
                         ValueFormatString="MMM-d"
                         Interval="1">
                    <vc:Axis.AxisLabels>
                        <vc:AxisLabels Angle="0" />
                    </vc:Axis.AxisLabels>
                </vc:Axis>
            </vc:Chart.AxesX>
            <vc:Chart.Series>
                <vc:DataSeries RenderAs="Column"
                               DataSource="{Binding MedicineSource}"
                               XValueFormatString="MMM-d">
                    <vc:DataSeries.DataMappings>
                        <vc:DataMapping MemberName="XValue"
                                        Path="Day" />
                        <vc:DataMapping MemberName="YValue"
                                        Path="Count" />
                    </vc:DataSeries.DataMappings>
                </vc:DataSeries>
            </vc:Chart.Series>
        </vc:Chart>
    </StackPanel>
</Button>
4

2 に答える 2

0

ここでは、 Microsoft の Chart Controlsを使用していると仮定しています。

Intervalプロパティを正しく設定したようです。しかし、グリッド ラインについて話している場合はMajorGrid、およびプロパティを使用する必要があります。MinorGrid MajorTickMarkMinorTickMark

現時点で私が考えている唯一のことは、X 軸のデータ型を DateTime ではなく double に変更し、それが役立つかどうかを確認することです。

グラフ作成コントロールに関する私の知識のほとんどは、サンプル コードをいじることで得られます。おそらく、あなたがしようとしていることに近いサンプルを見つけることができます。

于 2011-11-28T22:11:36.603 に答える