Dojo   发布时间:2022-04-21  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了dojo+线性图大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

1.js脚本:

 
 @H_403_5@
  
  
  • dojo.require("dojox.charTing.Chart2D");
    dojo.require("dojox.charTing.plot2d.Pie");
    dojo.require("dojox.charTing.action2d.Highlight");
    dojo.require("dojox.charTing.action2d.MoveSlice");
    dojo.require("dojox.charTing.action2d.Tooltip");
    dojo.require("dojox.charTing.themes.MiamiNice");
    dojo.require("dojox.charTing.widget.Legend");
  • @H_149_6@makeCharts=function(){
  • varchart1=newdojox.charTing.Chart2D("simplechart");
  • /*type:
  • *Lines,Markers,Areas,MarkersOnly
  • */
  • //chart1.addPlot("default",{type:"Lines"});
  • //chart1.addPlot("default",{type:"StackedAreas",lines:true,areas:true,markers:falsE});
  • chart1.addPlot("default",{type:"Lines",markers:true,tension:"X",shadows:{dx:2,dy:2}});
  • chart1.addPlot("other",{type:"Areas"});
  • chart1.addPlot("Grid",{type:"Grid",
  • hAxis:"otherx",
  • vAxis:"othery",
  • hMajorLines:true,
  • hMinorLines:false,
  • vMajorLines:true,
  • vMinorLines:false
  • });
  • //chart1.addAxis("x");
  • chart1.addAxis("x",{
  • labels:[
  • {value:1,text:"Jan"},{value:2,text:"Feb"},
  • {value:3,text:"Mar"},{value:4,text:"Apr"},
  • {value:5,text:"May"},{value:6,text:"Jun"},
  • {value:7,text:"Jul"},{value:8,text:"Aug"},
  • {value:9,text:"Sep"},{value:10,text:"Oct"},
  • {value:11,text:"Nov"},{value:12,text:"Dec"}
  • ]
  • });
  • chart1.addAxis("y",{vertical:true});
  • chart1.addSeries("Series1",[0,1.5,2,3,4,5,7]);
  • chart1.addSeries("Series2",[4,1,6,3],{plot:"other",stroke:{Color:"green"},fill:"lightblue"});
  • chart1.addSeries("SeriesA",[{x:1,y:5},{x:1.5,y:1.7},{x:2,y:9},{x:5,y:3}],{stroke:{Color:"red"}});
  • chart1.render();
  • };
  • dojo.addOnLoad(makeCharts);
  • 2.HTML代码

     
     
    1. <@H_197_352@divid="simplechart"style="width:600px;height:400px;"></@H_197_352@div>

    3.页面展示效果

    dojo+线性图

    大佬总结

    以上是大佬教程为你收集整理的dojo+线性图全部内容,希望文章能够帮你解决dojo+线性图所遇到的程序开发问题。

    如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

    本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
    如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
    标签:dojo线性