How can I show graph points in Oxyplot for a line graph?

Here is the xaml code for my chart:

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

Is there any way in the story series to show story points as circles or something like that?

Here is an example image of what I mean, each plot point has a small circle associated with it:

Plot points are shown

+6
source share
2 answers

From the related discussion:

This should be covered by the Marker* properties in the LineSeries . See Examples in the example browser.

It looks like you need to install MarkerFill and MarkerType . To show only markers (and there is no line), set the Color parameter to Transparent .

 <oxy:LineSeries ItemsSource="{Binding MyDataPoints}" Color="Transparent" MarkerFill="SteelBlue" MarkerType="Circle" /> 
+10
source

Answered on the Oxyplot forums for those who find this.

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

+2
source

All Articles