I want to add a colored point (red or green) on every "crossing" between the rings and segment lines. Is there a simpler way than making 240 Series which just have two datapoints?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
1 - There is no need to create different
Series
. Just add theDataPoints
you want at the spots you want! This is the easiest way, since you already know the values.2 - As an alternative you can use a
xxxPaint
event and draw filled circles (or whatever you fancy..). For this you need to convert the values to pixels. This can usually be achieved with theAxisX/AxisY.ValueToPixelPosition
methods. However forPolar Charts
this will not work. Instead you need to calculate the pixel coordinates yourself..The 2nd way is a bit harder, but of course will give you more control over the style of the points you draw..
Here is the result of adding
DataPoints
:Example code for the 1st version; first we set up a polar chart with its axis properties:
And then we add the points at the crossings and finally style one of them to show that they all can be different..:
For the code to calculate the pixel coordinates see this post!
Using the function in the link and this
PrePaint
event:we can adorn each point with a circle:
Or course, if you don't want to add the
DataPoints
in the first place, you can replace them by calculating the values like I did in the loops that added them..