7

私のグラフのxamlコードは次のとおりです。

<oxy:Plot HorizontalAlignment="Left" 
              Height="222" 
              Margin="0,49,0,0" 
              VerticalAlignment="Top" 
              Width="870" 
              Background="Transparent" 
              PlotAreaBorderColor="White" 
              LegendBorder="Transparent"
              Name="viewCountPlot"
              Title="Videos Watched"
              TextColor="White" IsLegendVisible="False" IsManipulationEnabled="False" IsMouseWheelEnabled="False">
        <oxy:Plot.Axes>
            <oxy:DateTimeAxis Name="datetimeAxis" Position="Bottom" MajorGridlineColor="#40FFFFFF" TicklineColor="White" StringFormat="M/d/yy" IntervalType="Days" ShowMinorTicks="False"/>
        </oxy:Plot.Axes>
        <oxy:Plot.Series>
            <oxy:LineSeries 
                Name="viewCountSeries" 
                Title="Videos Viewed"
                DataFieldX="Date" 
                DataFieldY="Value" 
                Color="#CCFA6800" 
                StrokeThickness="2" 
                TrackerFormatString="Date: {2:M/d/yy}&#x0a;Value: {4}"
                ItemsSource="{Binding PlotItems}" MarkerStroke="#FFFDFDFD" />
        </oxy:Plot.Series>
        <oxy:Plot.DefaultTrackerTemplate>
            <ControlTemplate>
                <Canvas>
                    <Grid Canvas.Left="{Binding Position.X}" Canvas.Top="{Binding Position.Y}">
                        <Ellipse Fill="White" Width="12" Height="12" HorizontalAlignment="Left" VerticalAlignment="Top">
                            <Ellipse.RenderTransform>
                                <TranslateTransform X="-6" Y="-6" />
                            </Ellipse.RenderTransform>
                        </Ellipse>
                        <TextBlock Foreground="{DynamicResource OrangeTextColor}" Text="{Binding}" Margin="-60 -40 0 0" />
                    </Grid>
                </Canvas>
            </ControlTemplate>
        </oxy:Plot.DefaultTrackerTemplate>
    </oxy:Plot>

プロットシリーズでは、プロットポイントを円またはその性質のものとして表示する方法はありますか?

これが私が意味することの例の画像です。各プロットポイントには小さな円が関連付けられています:

プロットポイントが表示されます

4

2 に答える 2

16

リンクされた議論から:

これは、サンプル ブラウザーのサンプルを参照のMarker*プロパティでカバーする必要があります。LineSeries

MarkerFillとを設定する必要があるようですMarkerType。マーカーのみを (線を表示せずに) 表示するには、 を に設定ColorTransparentます。

<oxy:LineSeries ItemsSource="{Binding MyDataPoints}" 
                Color="Transparent" 
                MarkerFill="SteelBlue" 
                MarkerType="Circle" />
于 2014-09-03T14:27:38.790 に答える
1

これを見つけた人のために Oxyplot フォーラムで回答しました。

https://oxyplot.codeplex.com/discussions/528893

于 2014-02-04T20:14:00.203 に答える