The lightest, fastest library on the schedule?



  • What is the most primitive library for javascripts?

    Location of several lines by date, specify names for axles, remove legends (name of lines by colour), maximum coverage of platform(s).

    To give little weight, I quickly pulled out and loaded the browser and the network. Used jqplot, but it's huge with a bunch of functions and brakes.



  • I've been looking for it, too, and I ended up writing it fast. It's almost like that.

    Graphic={
        time:10,
        init:function(){
            this.canvas=document.getElementById("graph");
            this.canvas.height=1000;
            this.canvas.width=document.body.clientWidth-20;
            this.pp=this.canvas.getContext('2d');
    
        Graphic.pp.fillStyle='#000000';                         
        //Оси
        Graphic.pp.fillRect(10,10,1,Graphic.canvas.height-20);
        Graphic.pp.fillRect(10,10,Graphic.canvas.width-20,1);
        //отметки и надписи на осях
        var i=100;
        while(i-->2){
            if(!(i%10)){
                Graphic.pp.fillText(i+'',0,i*10);
                Graphic.pp.fillRect(7,i*10,7,2);11
                Graphic.pp.fillRect(10,i*10,Graphic.canvas.width-20,0.5);
            }else Graphic.pp.fillRect(8,i*10,5,1);
        }
    
        var i=~~(Graphic.canvas.width/10);
        while(i-->2){
            if(!(i%10)){
                Graphic.pp.fillText(i.toString()+'s',i*10,7);                                   
                Graphic.pp.fillRect(i*10,7,2,7)
            }else Graphic.pp.fillRect(i*10,8,1,5);
        }
    },
    shot:function(stat){
        //Отрисовку следующей точки по координатам this.time и полученным данным из stat я опущу
        this.time++;
    }
    

    }
    Graphic.init();
    app.socket.on('stat',Graphic.shot);

    As always, the fastest and flexible library is VanillaJS.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2