Closed mschmitz2 closed 1 year ago
Thank you for your great work on this project!
Thank you 🙏
I have noticed an issue when updating from v1.8.0 to v1.9.0
Can it be somehow related to IsXValueIndexed
breaking change?
If no, then we need a repro project here...
Can it be somehow related to IsXValueIndexed breaking change?
I don't think it is as I'm not using indexed series here.
Does this work for you: ConsoleAppChartTest2.zip ?
I have tried to reduce the code to a minimum from the original solution. I am now plotting the same simple data twice: once as Point
and once as Line
. You can see that the data is plotted correctly when plotting as Point
, but that the first data point is replaced with (0,0) when plotting as Line
:
I could debug it up to the location where I set the data to Chart1.Series
:
prop_vals[seriesIdx].xAxVals.Zip(prop_vals[seriesIdx].ySeries, (xVal, o) => (xVal, o.yVal, o.ptLabel))
.ToList()
.ForEach(o =>
{
var pt = new DataPoint(o.xVal, o.yVal);
if (o.ptLabel != null)
pt.Label = o.ptLabel;
if (double.IsNaN(o.yVal))
pt.IsEmpty = true;
Chart1.Series[seriesIdx].Points.Add(pt);
});
after which Chart1.Series[0].Points
still has the correct values. So something must happen in the background after this.
Thanks @mschmitz2, I will look into it...
With points all are ok:
So, this is some kind of drawing glitch🤔 It's all very strange, need more investigation, when I will have a time...
P.s. you have a cross thread problems (accessing controls not from GUI thread) in you app.
P.p.s try to avoid unnecessary ToList()
(it's can be a real problem with large data).
Thanks for looking into it!
P.s. you have a cross thread problems (accessing controls not from GUI thread) in you app.
Yes, I removed the code dealing with that for this example since it works fine for the purpose of this.
P.p.s try to avoid unnecessary ToList() (it's can be a real problem with large data).
Thanks! It's indeed time I go through the code this is extracted from to look for performance improvements. A lot of this has just been adding new features quickly, one of which might have required a List..
Regression was introduced in 83bdc36379b44eb6bfaa66fbed39b6994327b6c8. I implemented the fix. But in my point of view problems was only with 1 points of series: Red question is strange (or may be here we have 3 series)?
Also I found that 83bdc36379b44eb6bfaa66fbed39b6994327b6c8 commit introduced a problems with empty points when they are visible: I totally missed that empty point can be not so empty 🤦♂️🙄
Confirming that 1.9.1 fixes all the original issues, including the red case. All back to how it looked with 1.8:
Thanks for the quick fix!
Thank you for your great work on this project!
I have noticed an issue when updating from v1.8.0 to v1.9.0 in some of my charts, but not in others. I am not entirely sure sure what causes this issue. The only thing that sets these plots apart from others that are fine, is that they mix series of different types (3x Line series and 2x Point series) though I'm not sure how that would affect things internally.
With v1.9.0 I get this:
while for the same chart with v1.8.0 I get this, as expected:
Showing the entire x- and y-axes, one can see that for all line plot series the actual first data point is replaced by the point (0,0):