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> <body>
<div id="chart"></div> <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"> <script type="text/javascript">
seajs.config({ seajs.config({
alias: { alias: {

View File

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