Code: Select all
private Axis CreateCustomYAxis(SignalVectorPair svPair)
{
var color = ChartDataToZData.MColorToDColor(svPair.VectorM.Color);
var yAxis = new Axis
{
Visible = false,
Horizontal = false,
Grid = { Visible = false },
Labels = { Font = { Color = color } },
AxisPen = { Color = color, Visible = true },
Ticks = { Color = color, Visible = true },
PositionUnits = PositionUnits.Pixels
};
yAxis.SetMinMax(svPair.SignalM.MinOrFactor, svPair.SignalM.MaxOrOffset);
return yAxis;
}
Code: Select all
private void SetAxisLabelsToGridTicks(Axis axis)
{
double diff = (axis.Maximum - axis.Minimum) / OscilNumOfGridLines;
axis.Labels.Items.Clear();
for (int j = 0; j <= OscilNumOfGridLines; j++)
{
double val = axis.Minimum + (diff * j);
string valStr = val.ValToString(true, false, 4);
axis.Labels.Items.Add(val, valStr);
}
}
but sometimes some of the labels are disappear, i wanted to add a photo but i dont know how.
i have checked and 'val.ValToString(true, false, 4);' doesnt return null or empty string.