Hello Pasi,
when zooming I get a false representation.
Without zoom.
With zoom.
Line chart zooming false representation
Moderator: Queue Moderators
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: Line chart zooming false representation
How have you composed this chart? With a single PointLineSeries or several PointLineSeries? Single approach is wrong, btw. If you could post some code or a VS project, that would help a in helping more.
LightningChart Support Team, PT
Re: Line chart zooming false representation
Hello Pasi,
Yes it is one Point Line Series.
Since several objects are to be displayed with N points.
Yes it is one Point Line Series.
Since several objects are to be displayed with N points.
Code: Select all
private IEnumerable<PointLineSeries> CreateChart(LightningChartUltimate lightningChart, IList<Mypoint> data, XAxisTypes xAxisType)
{
if (data == null)
return null;
if (data.Count == 0)
return null;
PointLineSeries.Clear();
var points = new List<SeriesPoint>();
var path = data[0].path;
for (var i = 0; i < data.Count; i++)
{
var point = data[i];
var nextpoint = GetNextpoint(data, i);
if (xAxisType.Equals(XAxisTypes.PointNumber))
points.Add(new SeriesPoint(Convert.ToInt32(point.pointID), GetValueFrompoint(point), point));
else
points.Add(new SeriesPoint(point.XRelativ, GetValueFrompoint(point), point));
if (nextpoint == null || !path.Equals(nextpoint.Path))
{
var pointLineSeries = new PointLineSeries(lightningChart.ViewXY, lightningChart.ViewXY.XAxes[0], lightningChart.ViewXY.YAxes[0])
{
PointsVisible = false,
Title = { Text = GetLegendName(data, point, false) },
Points = points.ToArray(),
MouseHighlight = MouseOverHighlight.None,
MouseInteraction = false
};
pointLineSeries.Points = points.ToArray();
pointLineSeries.PointStyle = GetPointShapeStyle(pointLineSeries.PointStyle);
pointLineSeries.LineStyle.Color = (point.color == Color.Transparent) ? Color.Gray : point.color;
// ToolTip
foreach (var point in points)
{
var marker = new SeriesEventMarker(pointLineSeries)
{
XValue = point.X,
YValue = point.Y,
VerticalPosition = SeriesEventMarkerVerticalPosition.AtYValue,
HorizontalPosition = SeriesEventMarkerHorizontalPosition.AtXValue,
Tag = point.Tag,
MouseHighlight = MouseOverHighlight.None,
MoveByMouse = false,
Symbol = pointLineSeries.PointStyle,
Label = { Visible = false }
};
pointLineSeries.SeriesEventMarkers.Add(marker);
}
PointLineSeries.Add(pointLineSeries);
if (nextpoint != null)
path = nextpoint.path;
points.Clear();
}
}
return PointLineSeries;
}
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: Line chart zooming false representation
In a PointLineSeries, the data must follow the rule x[i+1] >= x.
Use several PointLineSeries instead.
Use several PointLineSeries instead.
LightningChart Support Team, PT
Re: Line chart zooming false representation
How can I fill the points according to coordinates?
I have several objects with n-number of points, how can I then each object in the legend show and hide?
How many points can I add to a Point Line Series?
How do I program this example?
How many Points LineSeries would it be?
The legend should include only the 3 items!
I have several objects with n-number of points, how can I then each object in the legend show and hide?
How many points can I add to a Point Line Series?
How do I program this example?
How many Points LineSeries would it be?
The legend should include only the 3 items!
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: Line chart zooming false representation
You'll need one PointLineSeries for each continuous line strip, travelling from left to right.
You can prevent the PointLineSeries from listing itself in the legend by setting pointLineSeries.Title.ShowInLegendBox = false.
You can set over 1 M points per series.
You can prevent the PointLineSeries from listing itself in the legend by setting pointLineSeries.Title.ShowInLegendBox = false.
You can set over 1 M points per series.
LightningChart Support Team, PT