mirror of
https://github.com/TBEDP/datavjs.git
synced 2025-12-08 19:45:52 +00:00
Update doc
This commit is contained in:
parent
e34fea61b2
commit
f774db6326
@ -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: {
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user