c# – 如何在线图中显示Oxyplot中的绘图点?

这是我的图表的xaml代码
<oxy:Plot HorizontalAlignment="Left" 
              Height="222" 
              Margin="0,49,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>

在情节系列中有没有办法将情节点显示为圆形或某种性质的东西?

这是我的意思的示例图像,每个绘图点都有一个与之关联的小圆:

解决方法

来自链接的讨论:

This should be covered by the Marker* properties in the Lineseries
See examples in the Example browser.

看起来你必须设置MarkerFill和MarkerType.要仅显示标记(并且不显示任何线条),请将“颜色”设置为“透明”.

<oxy:Lineseries ItemsSource="{Binding MyDataPoints}" 
                Color="Transparent" 
                MarkerFill="SteelBlue" 
                MarkerType="Circle" />

相关文章

在要实现单例模式的类当中添加如下代码:实例化的时候:frmC...
1、如果制作圆角窗体,窗体先继承DOTNETBAR的:public parti...
根据网上资料,自己很粗略的实现了一个winform搜索提示,但是...
近期在做DSOFramer这个控件,打算自己弄一个自定义控件来封装...
今天玩了一把WMI,查询了一下电脑的硬件信息,感觉很多代码都...
最近在研究WinWordControl这个控件,因为上级要求在系统里,...