0

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

enter image description here

I hope 2 solutions

  1. the max y value text can be placed in the right of y axis
  2. 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);
dbc
  • 104,963
  • 20
  • 228
  • 340
  • need someone help – ice0030 Nov 25 '21 at 05:14
  • You have shown your code and described what you need to accomplish... but what is your question? What is the problem you are trying to solve? From [ask]: *Introduce the problem before you post any code... xplain how you encountered the problem you're trying to solve, and any difficulties that have prevented you from solving it yourself.* It's not clear from your first paragraph what your problem is. Might you [edit] to clarify the language please? – dbc Nov 28 '21 at 21:55

0 Answers0