SuperPlan(7)TaoBao Winner - UI Highcharts JS and Bootstrap

SuperPlan(7)TaoBao Winner - UI Highcharts JS and Bootstrap

11. HighCharts JS

11.1 Getting Started
We can download the JS file from this URL http://www.highcharts.com/download or Directly from CDN.

Found a very useful website to test the JS, http://jsfiddle.net/. We can also demo and test that on the website.
Here is the simplest demo html template
<html>
<head>
<title>HighCharts Starting</title><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script><script src="http://code.highcharts.com/highcharts.js"></script></head><body><div id="container" style="width:100%; height:400px;"></div><script>var options = { chart: { type: 'bar' }, title: { text: 'Fruit Consumption' }, xAxis: { categories: ['Apples', 'Bananas', 'Oranges'] }, yAxis: { title: { text: 'Fruit eaten' } }, series: [{ name: 'Jane', data: [1, 1, 4] }, { name: 'John', data: [5, 7, 3] }] }$(function () { $('#container').highcharts(options);});</script></body>

</html>

And Learned how to set options. Just do it as JSON format.
var options = {
chart: {
type: 'bar'
},
title: {
text: 'Fruit Consumption'
},
xAxis: {
categories: ['Apples', 'Bananas', 'Oranges']
},
yAxis: {
title: {
text: 'Fruit eaten'
}
},
series: [{
name: 'Jane',
data: [1, 1, 4]
}, {
name: 'John',
data: [5, 7, 3]
}]
}

$(function () {
$('#container').highcharts(options);
});

All in the future, I can play on this screen http://jsfiddle.net/luohuazju/qLRGD/

I just play with it a little bit, the detail are here http://docs.highcharts.com/#home.

12. BootStrap with Version 2.3.2
12.1 HTML Template
I just use static html page to play with bootstrap, and I need to investigate the detail of all the CSS.
Here is the Header
<!DOCTYPEhtml>
<htmllang="en">
<head>
<title>Grid System</title>
<meta name="viewport"content="width=device-width, initial-scale=1.0">
<link href="../css/lib/bootstrap/2.3.2/bootstrap.min.css"rel="stylesheet"media="screen">
<link href="../css/lib/bootstrap/2.3.2/bootstrap-responsive.min.css"rel="stylesheet"media="screen">
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="../js/lib/bootstrap/2.3.2/bootstrap.min.js"></script>

</head>
…snip…

The most import part is that we need to using media="screen".

12.2 Grid System
<div class="row">
<div class="span1">Span1</div>
</div>

We can have span1 to span12. And we also have offset1 to offset12.

Sometimes, we can use nesting row and class can be changed to row-fluid
<div class="row-fluid">
<div class="span9">
span 9 column
<div class="row-fluid">
<div class="span6">Span 6</div>
<div class="span3">Span 3</div>
</div>
</div>

12.3 Layout and Responsive
<div class="container">
</div>

<div class="container-fluid">
<div class="row-fluid">
<div class="span2"> Sidebar </div>
<div class="span10"> Body Content </div>
</div>
</div>

Responsive
<div class="span2">
<div class="hidden-desktop">Hidden Desktop</div>
<div class="hidden-tablet">Hidden Tablet</div>
<div class="hidden-phone">Hidden Phone</div>
</div>
<div class="span10">
<div class="visible-desktop">visible-desktop</div>
<div class="visible-tablet">visible-tablet</div>
<div class="visible-phone">visible-phone</div>

</div>

When I resize the browser, I can test the look and feel. That is amazing.

continue...

13. BackBone
come soon...


References:
http://dailyjs.com/2012/11/29/backbone-tutorial-1/
http://backbonejs.org/#introduction

http://twitter.github.io/bootstrap/scaffolding.html

high charts
http://www.highcharts.com/
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值