You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have been trying to format my XAxis to show datetime format as yy-mm-dd hh:mm:ss but all I get is the representation as number.
The labeler does not seem to work since it expects a double, and the LabelFormatter does not exist on the cartesianChart.XAxis.
How do do? Any ideas?
List<LineSeries<DateTimePoint>> lineSeries = new List<LineSeries<DateTimePoint>>();
foreach (var item in lineSeriesList)
{
lineSeries.Add(
new LineSeries<DateTimePoint>
{
Name = item.Key,
Values = item.Value,
Fill = null,
GeometrySize = 5
}) ;
}
ISeries[] series = lineSeries.ToArray();
cartesianChart1.Series = series;
cartesianChart1.ZoomMode = LiveChartsCore.Measure.ZoomAndPanMode.X;
cartesianChart1.ZoomMode = LiveChartsCore.Measure.ZoomAndPanMode.Y;
List<Axis> xAxis = new List<Axis>
{
new Axis
{
UnitWidth = TimeSpan.FromSeconds(1).Ticks,
LabelsRotation = 30
}
};
cartesianChart1.LegendPosition = LiveChartsCore.Measure.LegendPosition.Left;
cartesianChart1.XAxes = xAxis;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I have been trying to format my XAxis to show datetime format as yy-mm-dd hh:mm:ss but all I get is the representation as number.
The labeler does not seem to work since it expects a double, and the LabelFormatter does not exist on the cartesianChart.XAxis.
How do do? Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions