Как я могу показать точки графика в Oxyplot для линейного графика?

Вот код 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>

В сюжетной серии есть ли способ показать сюжетные точки в виде кругов или что-то в этом роде?

Вот пример изображения того, что я имею в виду, с каждой точкой графика связан небольшой кружок:

Показаны сюжетные точки


person JBurlison    schedule 04.02.2014    source источник


Ответы (2)


Из связанного обсуждения:

Это должно быть описано в свойствах Marker* в LineSeries См. примеры в обозревателе примеров.

Похоже, вам нужно установить MarkerFill и MarkerType. Чтобы отображались только маркеры (без линии), установите Color на Transparent.

<oxy:LineSeries ItemsSource="{Binding MyDataPoints}" 
                Color="Transparent" 
                MarkerFill="SteelBlue" 
                MarkerType="Circle" />
person ken    schedule 03.09.2014

Ответил на форумах Oxyplot для тех, кто нашел это.

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

person JBurlison    schedule 04.02.2014
comment
Эта ссылка мертва - person b.holz; 09.11.2020