Skip to content

Latest commit

 

History

History
35 lines (30 loc) · 1.89 KB

README.md

File metadata and controls

35 lines (30 loc) · 1.89 KB

svg-graphic

#####svg画的折线图组件 =======================================================================
[插件名称] svg制作折线统计图组件
----------------------------------------------------------------------------------------------------
[描 述] 调用简单,配置简单,样式更灵活,更轻量级,整体原生开发,速度更快,优点:更小更快。兼容各 大主流浏览器,IE8及以下不支持。
----------------------------------------------------------------------------------------------------
[作者网名] webjackchen(阿飞)
[邮 箱] [email protected]
[QQ交流] 602071930
[版 本 号] ver0.0.1
========================================================================
####html

<div id="div1" class="figurebox">
    <div class="maskPrompt">
    </div>
</div>

####js部分 首先引入svg-graphic.js
<script type="text/javascript" src="svg-graphic.js"></script>

然后实例化对象 CreatLine();
设置配置项

 var oDiv1 = document.getElementById("div1");
        var d1 = new CreatLine();
        d1.init(oDiv1,{
            type:"甲醛",
            data:[{x:"周一",y:14},{x:"周二",y:15},{x:"周三",y:1500},{x:"周四",y:76},{x:"周五",y:3500},{x:"周六",y:30},{x:"周天",y:42},{x:"周六",y:30},{x:"周天",y:42},{x:"周六",y:30},{x:"周天",y:42}]
        });

#####具体效果,请看http://webjackchen.github.io/svg-graphic/