需要你的建议!
我使用TickCreationFunc和LabelTransformFunc在XAxis上显示时间线
就像这样:
var plotCube = new ILPlotCube(tag, true);
List<Tuple<double, string>> ticks = null;
plotCube.Axes.XAxis.Ticks.TickCreationFunc = (min, max, qty) =>
{
ticks = AxisHelper.CreateUnixDateTicks(min, max, qty).ToList();
return ticks.Select(x => (float)x.Item1).ToList();
};
plotCube.Axes.XAxis.Ticks.LabelTransformFunc = (ind, val) =>
{
if (ticks != null)
return ticks[ind].Item2;
else
return null;
};
plotCube.Axes.XAxis.ScaleLabel.Visible = false; //does not help结果是相当好的,但是我找不到一种方法来去除刻度标签。

两个附带问题:
1) VS显示警告'ILNumerics.Drawing.Plotting.ILTickCollection.TickCreationFunc‘是过时的:’使用TickCreationFuncEx代替!‘。但是,从来没有调用过TickCreationFuncEx。
( 2)有没有办法告诉ILNumerics不要缩略滴答号?
感谢你的帮助!
发布于 2015-04-08 07:02:51
TickCreationFuncEx,比例标签就会消失。界面非常相似。但是您的函数必须返回IEnumerable<ILTick>:
var plotCube = ilPanel1.Scene.First();List> ticks = null;plotCube.Axes.XAxis.Ticks.TickCreationFuncEx =(浮点数、浮点数max、int qty、ILAxis轴、AxisScale比例尺) => { ticks = CreateUnixDateTicks(min、max、qty).ToList();返回//返回IEnumerable!};//您不需要这个//plotCube.Axises.caleLabel.visible= false;SceneSyncRoot了,可以更直截了当地说:
ilPanel1.Scene.First().Axes.XAxis.Ticks.MaxNumberDigitsShowFull = 10;/或就您的情况而言,plotcube.Axes.XAxis.Ticks.MaxNumberDigitsShowFull = 10;注意:在代码中使用XAxis,而不是YAxis acc。给你的例子
https://stackoverflow.com/questions/29505149
复制相似问题