js线性统计图

XML/HTML Code
- <p> Inline Sparkline: <span class="inlinesparkline">1,4,4,7,5,9,10</span>. </p>
- <p> Sparkline with dynamic data: <span class="dynamicsparkline">Loading..</span> </p>
- <p> Bar chart with dynamic data: <span class="dynamicbar">Loading..</span> </p>
- <p> Bar chart with inline data: <span class="inlinebar">1,3,4,5,3,5</span> </p>
JavaScript Code
- <script type="text/javascript">
- /* <![CDATA[ */
- $(function() {
- /** This code runs when everything has been loaded on the page */
- /* Inline sparklines take their values from the contents of the tag */
- $('.inlinesparkline').sparkline();
- /* Sparklines can also take their values from the first argument passed to the sparkline() function */
- var myvalues = [10,8,5,7,4,4,1];
- $('.dynamicsparkline').sparkline(myvalues);
- /* The second argument gives options such as specifying you want a bar chart */
- $('.dynamicbar').sparkline(myvalues, {type: 'bar', barColor: 'green'} );
- /* Use 'html' instead of an array of values to pass options to a sparkline with data in the tag */
- $('.inlinebar').sparkline('html', {type: 'bar', barColor: 'red'} );
- });
- /* ]]> */
- </script>
原文地址:http://www.freejs.net/article_jquerywenzi_225.html
最近更新
- jQuery轮播图插件slider-...
- CSS3鼠标悬停图片遮罩层变形动画特...
- 响应式全屏手风琴菜单,同时支持垂直方...
- 分组select选择器,支持多选和单...
- jQuery时间日期选择器代码日历插...
- Select 选择器 可以清空的单选...
我爱薅羊毛
点击最多
广告赞助
相关文章
- jquery点击显示或隐藏内容,可以一次展开多个和...
- tooltips/弹出层/消息提示效果,支持点击与...
- jQuery幸运大转盘抽奖活动代码
- jquery来实现的添加商品和减少商品数量,用于购...
- jQuery手机端弹出层提示对话框
- php js实现拖动滑块完成拼图验证码

