-
Notifications
You must be signed in to change notification settings - Fork 569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chart starts in the "wrong" location until "right" location is moused over #773
Comments
Hello and thanks for the issue. This is strange, I am not completely sure if this is an issue of Live Charts, notice in this repository all the charts start or their actual position, could you please provide a small repository or test project with the issue? |
I probably can't create a minimal example at this time. I changed the way my GUI works and it doesn't happen anymore, but it was long ago enough that I'm not quite sure how to quickly get back there. You can probably close this. |
I have similar problem. After add data into series, the chart not show correct until I click/zooming it. ...
<lvc:CartesianChart Visibility="{Binding IsLoadingData, Converter={StaticResource Boolean2VisibilityReConverter}}"
Series="{Binding Series}" XAxes="{Binding XAxes}" ZoomMode="X" />
... public class ViewModel {
public IReadOnlyList<Axis> XAxes { get; } = new[] {
new Axis {
Labeler = value => value >= 0 ? new DateTime((long)value).ToString("HH:mm") : string.Empty,
UnitWidth = TimeSpan.FromMinutes(1).Ticks
}
};
public IReadOnlyList<ISeries> Series { get; }
public ObservableCollection<FinancialPoint> DataPoints { get; } = new();
public StockViewModel() {
Series = new[] {
new CandlesticksSeries<FinancialPoint> {
Values = DataPoints,
TooltipLabelFormatter =
p => $"{p.Model?.Date:HH:mm} O: {p.Model?.Open} H: {p.Model?.High} L: {p.Model?.Low} C: {p.Model?.Close}",
}
};
}
public async Task LoadData() {
try {
IsLoadingData = true;
var data = await LoadSomethingData();
foreach (var s in data) {
DataPoints.Add(new FinancialPoint(
s.Time,
(double)s.High,
(double)s.Open,
(double)s.Close,
(double)s.Low
));
}
} finally {
IsLoadingData = false;
}
}
}
|
This is hard to reproduce, in general there will be multiple improvements in the library in the next version (beta-800), I will close this for now since we can not reproduce it and it is probably already fixed, I fixed a bunch of render issues and added multiple tests, probably this got fixed some there in #1028 or #1021 please open a new issue if the error persists after beta 800 version. |
Describe the bug
I am using LiveCharts2 in Avalonia. I have two charts setup inside a Grid. When I open the window the charts are displayed "offset" up and to the left. Once I mouse-over the correct location they "pop" into position.
Expected behavior
I would expect the charts to show up in their designated grid spot upon the window opening.
Screenshots
Here is a GIF showing what I mean.
Desktop (please complete the following information):
Code
VIEW
VIEWMODEL
The text was updated successfully, but these errors were encountered: