Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用Teechart以时间间隔手动绘制yaxis_Javascript_Jquery_Css_Teechart - Fatal编程技术网

Javascript 使用Teechart以时间间隔手动绘制yaxis

Javascript 使用Teechart以时间间隔手动绘制yaxis,javascript,jquery,css,teechart,Javascript,Jquery,Css,Teechart,我正在使用Teechart库以1秒的时间间隔显示y轴。图表1.axes.left.increment=1;帮助我在1的间隔内增加yaxis。我需要的是在这些实线之间画出虚线。我想以0.20秒的时间间隔手动添加虚线的线系列。如何使用线系列在此处添加虚线 function draw_TeeChart() { var w = window.innerWidth, h = window.innerHeight; // Initialize Teech

我正在使用Teechart库以1秒的时间间隔显示y轴。图表1.axes.left.increment=1;帮助我在1的间隔内增加yaxis。我需要的是在这些实线之间画出虚线。我想以0.20秒的时间间隔手动添加虚线的线系列。如何使用线系列在此处添加虚线

 function draw_TeeChart() {

            var w = window.innerWidth, h = window.innerHeight;

            // Initialize Teechart[![enter image description here][1]][1]
            Chart1 = new Tee.Chart("canvas");

            document.getElementById("canvas").style.position  = "relative";
            document.getElementById("canvas").width= Math.round(0.82*w);document.getElementById("canvas").height= Math.round(0.89*h);   //Chart1.bounds.x = Math.round(0.01*w);

            Chart1.bounds.x = 14;Chart1.bounds.y= 10;
            Chart1.bounds.width = Math.round(chartW*w);Chart1.bounds.height= Math.round(0.88*h);
            Chart1.legend.visible = false; Chart1.panel.transparent = true;
            Chart1.title.visible = false;Chart1.axes.bottom.title.text = " ";
            Chart1.axes.left.increment = 1;


            Chart1.axes.bottom.increment=1;

Chart1.axes.bottom.innerTicks.visible = true;
        Chart1.axes.bottom.ticks.length = 9;
        Chart1.axes.bottom.ticks.stroke.fill = "blue";

        Chart1.axes.bottom.minorTicks.visible = true;
        Chart1.axes.bottom.minorTicks.length = 4;
        Chart1.axes.bottom.minorTicks.count = 4;
        Chart1.axes.bottom.minorTicks.stroke.fill = "green";



            // var dottedLines =  Chart1.axes.bottom.increment=.2;


                // var increment = 0.20;
                // var dottedLines =  Chart1.axes.bottom.grid.format.stroke.dash = [5,3]; 
                // var solidLines = Chart1.axes.bottom.increment=1;


            // for(increment =0.20;increment<100;increment =increment+0.20){

            //  if (increment % 1 == 0) {

            //  Chart1.axes.bottom.increment=1;
            //      }
            //  else {
            //      Chart1.axes.bottom.increment=0.20;
            //      Chart1.axes.bottom.grid.format.stroke.dash = [5,3]; 
            //  }

            // }

            Chart1.walls.back.format.fill = wallColorCode;
            Chart1.walls.back.format.shadow.visible = false;
            document.body.style.cursor = "pointer";

            document.getElementById("EventCount").value = event_time.length.toFixed(0);

    }
function draw\u TeeChart(){
var w=window.innerWidth,h=window.innerHeight;
//初始化Teechart[![在此处输入图像描述][1][1]
图表1=新的T形图(“画布”);
document.getElementById(“canvas”).style.position=“relative”;
document.getElementById(“canvas”).width=Math.round(0.82*w);document.getElementById(“canvas”).height=Math.round(0.89*h);//Chart1.bounds.x=Math.round(0.01*w);
Chart1.bounds.x=14;Chart1.bounds.y=10;
Chart1.bounds.width=Math.round(chartW*w);Chart1.bounds.height=Math.round(0.88*h);
Chart1.legend.visible=false;Chart1.panel.transparent=true;
Chart1.title.visible=false;Chart1.axes.bottom.title.text=“”;
图表1.axes.left.increment=1;
图表1.axes.bottom.increment=1;
Chart1.axes.bottom.innerTicks.visible=真;
图表1.axes.bottom.ticks.length=9;
图表1.axes.bottom.ticks.stroke.fill=“蓝色”;
Chart1.axes.bottom.minorTicks.visible=true;
图表1.axes.bottom.minorTicks.length=4;
图表1.axes.bottom.minorTicks.count=4;
图表1.axes.bottom.minorTicks.stroke.fill=“绿色”;
//var dottedLines=Chart1.axes.bottom.increment=0.2;
//var增量=0.20;
//var dottedLines=Chart1.axes.bottom.grid.format.stroke.dash=[5,3];
//var solidLines=Chart1.axes.bottom.increment=1;

//对于(increment=0.20;increment,这里的示例显示了如何扩展底部轴,添加新的
innerGrid
属性,并在
drawLabel
覆盖中使用它

var-Chart1;
函数绘图(){
图表1=新T.图表(“画布1”);
var line1=Chart1.addSeries(新的Tee.Line());
line1.data.values=[10,20,30,20,50];
Chart1.legend.visible=假;
图表1。轴。底部。设定最小值(0,5);
图表1.axes.bottom.increment=1;
Chart1.axes.bottom.innerTicks.visible=真;
图表1.axes.bottom.ticks.length=9;
图表1.axes.bottom.ticks.stroke.fill=“蓝色”;
Chart1.axes.bottom.minorTicks.visible=true;
图表1.axes.bottom.minorTicks.length=4;
图表1.axes.bottom.minorTicks.count=4;
图表1.axes.bottom.minorTicks.stroke.fill=“绿色”;
Chart1.axes.bottom.innerGrid=[];
图表1.axes.bottom.innerGrid.increment=0.20;
Chart1.axes.bottom.innerGrid.format=新的T形三通格式(Chart1);
Chart1.axes.bottom.innerGrid.format.stroke.fill=Chart1.axes.bottom.grid.format.stroke.fill;
Chart1.axes.bottom.innerGrid.format.stroke.dash=[5,3];
Chart1.axes.bottom.oldDrawLabel=Chart1.axes.bottom.drawLabel;
Chart1.axes.bottom.drawLabel=函数(值,r){
此.oldDrawLabel(值,r);
var c=this.chart.ctx,
rect=this.chart.chartRect,
f=this.innerGrid.format,
tmpX;
var tmpValue=value+this.innerGrid.increment;
while(tmpValuerect.x)和&(tmpXrect.x)和&(tmpX

此浏览器似乎不支持HTML5画布。

转到d3文档并阅读“ticks()”我想用垂直虚线代替记号,记号将向里延伸。您好,谢谢您的回答。运行代码段在这里不起作用。您能检查一下吗?顺便说一句,我在本地机器上试过。它按预期工作。谢谢!!您好,我可以知道它是否可以读取y轴的动态值。因为它是从第0个值开始读取的直到第10个值。但我必须将数据流传输到第n个值。它无法显示我试图传递的所有信号。请解释我如何加载动态值?顺便说一句,我通过删除setMin值将其修复。再次感谢!嗨,我正在使用您的解决方案在T形图的实线之间添加虚线。但我可以知道虚线是否为在逐秒滚动时,es从0.2秒开始。当我单击teechart上的单跳时,虚线在第0到第1个vakue中消失。它仅从x轴的第2个值出现。