I do a project to show multi signal waves vertically arrangement。when the signal type is different(bool vs unsigned short)(means max value different)。the two signals y axis cant be aligned in x direction(because the max y value string occupy different space),something like this
I hope 2 solutions
- the max y value text can be placed in the right of y axis
- the max y value can be set to occupy same space(max value 1 occupy 5 characters padleft with empty,max value 65535 occupy 5 characters)
this is my code:
var series1 = new LineSeries { Title = serietitle, MarkerType = MarkerType.Circle };
var dateTimeAxis1 = new DateTimeAxis() { Minimum = DateTimeAxis.ToDouble(DateTime.Now), Maximum = DateTimeAxis.ToDouble(DateTime.Now.AddHours(1)) };
//dateTimeAxis1.Title = "Time";
model.Axes.Add(dateTimeAxis1);
model.Series.Add(series1);
LinearAxis leftAxis = new LinearAxis()
{
Position = AxisPosition.Left,
AbsoluteMaximum= maxy,
IsAxisVisible = true, //
Minimum = 0,
Maximum = maxy,
Title = "SigValue",//
IsZoomEnabled = false,//
};
model.Axes.Add(leftAxis);