Update doc

This commit is contained in:
Jackson Tian 2012-10-20 18:21:39 +08:00
parent e34fea61b2
commit f774db6326
2 changed files with 25 additions and 28 deletions

View File

@ -30,13 +30,6 @@
<body>
<div id="chart"></div>
<!--
<p>code Output: (Download codes.rar, then replace the content of dataInput.js with the codes in the textarea below.)</p>
<p><textarea id="codeOutput" class="textArea">
</textarea></p>
<p>download <a href="./codes.rar">codes.rar</a></p>
-->
<script type="text/javascript">
seajs.config({
alias: {

View File

@ -21,19 +21,22 @@
* Examples:
* ```
* //Create bullet in a dom node with id "chart", width is 500; height is 600px;
* var bullet = new Bullet("chart",
* {"width": 500,
* "height": 600,
* "margin": [10, 10, 20, 70]});
* var bullet = new Bullet("chart", {
* "width": 500,
* "height": 600,
* "margin": [10, 10, 20, 70]
* });
* //Create bullet with log base;
* var log = new Bullet("chart2",
* {width: 300, height: 60,
* margin : [10, 10, 20, 70],
* backgroundColor: ["#66f", "#ddf"],
* measureColor: ["#000", "#000"],
* markerColor: "#44f",
* axisStyle: "log",
* logBase: 10});
* var log = new Bullet("chart2", {
* width: 300,
* height: 60,
* margin: [10, 10, 20, 70],
* backgroundColor: ["#66f", "#ddf"],
* measureColor: ["#000", "#000"],
* markerColor: "#44f",
* axisStyle: "log",
* logBase: 10
* });
* ```
* @param {Mix} node The dom node or dom node Id
* @param {Object} options options json object for determin stream style.
@ -77,17 +80,18 @@
* 设置数据源
* Examples:
* ```
* bullet.setSource({ title: "Sample",
* subtitle: "ratio",
* ranges: [0, 0.5, 0.8, 1],
* measures: [0.7, 0.9],
* markers: [0.6],
* rangeTitles: ["below 50%", "top 20% - 50%", "top 20%"],
* measureTitles: ["value is 0.7", "value is 0.9"],
* markerTitles: ["mean is 0.6"]
* bullet.setSource({
* title: "Sample",
* subtitle: "ratio",
* ranges: [0, 0.5, 0.8, 1],
* measures: [0.7, 0.9],
* markers: [0.6],
* rangeTitles: ["below 50%", "top 20% - 50%", "top 20%"],
* measureTitles: ["value is 0.7", "value is 0.9"],
* markerTitles: ["mean is 0.6"]
* })
* ```
* @param {Object} source
* @param {Object} source 数据源
*/
Bullet.prototype.setSource = function (source) {
var conf = this.defaults,