你好,你说的设置x轴每个刻度固定30秒,我理解你X轴绑定的是DateTime类型,
此类型默认以天为单位,要设置为5秒,代码为
- flexChart1.AxisX.MajorUnit = 1/24/3600*5;
复制代码
设置滚动条的代码
- AxisScrollbar scrollbarX, scrollbarY;
- //Load方法中
- flexChart1.Rendering += FlexChart1_Rendering;
- private void FlexChart1_Rendering(object sender, RenderEventArgs e) {
- if (scrollbarX != null && scrollbarY != null)
- return;
- scrollbarX = new AxisScrollbar(flexChart1.AxisX);
- scrollbarY = new AxisScrollbar(flexChart1.AxisY);
- }
复制代码
|