Skip to content

Commit

Permalink
More examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Nov 9, 2019
1 parent 8d62451 commit 29c770e
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,18 @@ <h1>Bytes - Bar Chart</h1>
new Chartkick.BarChart("bytes-bar", [["A",2147483648],["B",4294967296],["C",6442450944],["D",8589934592],["E",10737418240]], {bytes: true});
</script>

<h1>Precision - Large</h1>
<div id="precision-large" style="height: 300px;"></div>
<script>
new Chartkick.ColumnChart("precision-large", [["A",12354],["B",1235.4],["C",123.54]], {precision: 3});
</script>

<h1>Precision - Small</h1>
<div id="precision-small" style="height: 300px;"></div>
<script>
new Chartkick.ColumnChart("precision-small", [["A",1.2345],["B",0.12345],["C",0.012345]], {precision: 3});
</script>

<h1>Round - Positive</h1>
<div id="round-positive" style="height: 300px;"></div>
<script>
Expand All @@ -670,28 +682,22 @@ <h1>Round - Negative</h1>
new Chartkick.ColumnChart("round-negative", [["A",21474.83648],["B",42949.67296],["C",64424.50944],["D",85899.34592],["E",10737.418240]], {round: -3});
</script>

<h1>Zeros</h1>
<div id="zeros" style="height: 300px;"></div>
<script>
new Chartkick.ColumnChart("zeros", [["A",1],["B",1.2],["C",1.23],["D",1.234],["E",1.2345]], {round: 2, zeros: true});
</script>

<h1>Precision - Large</h1>
<div id="precision-large" style="height: 300px;"></div>
<h1>Round and Precision</h1>
<div id="round-precision" style="height: 300px;"></div>
<script>
new Chartkick.ColumnChart("precision-large", [["A",12354],["B",1235.4],["C",123.54]], {precision: 3});
new Chartkick.ColumnChart("round-precision", [["A",1.2345],["B",0.12345],["C",0.012345]], {round: 2, precision: 3});
</script>

<h1>Precision - Small</h1>
<div id="precision-small" style="height: 300px;"></div>
<h1>Zeros - Precision</h1>
<div id="zeros-precision" style="height: 300px;"></div>
<script>
new Chartkick.ColumnChart("precision-small", [["A",1.2345],["B",0.12345],["C",0.012345]], {precision: 3});
new Chartkick.ColumnChart("zeros-precision", [["A",1],["B",1.2],["C",1.23],["D",1.234],["E",1.2345]], {precision: 4, zeros: true});
</script>

<h1>Round and Precision</h1>
<div id="round-precision" style="height: 300px;"></div>
<h1>Zeros - Round</h1>
<div id="zeros-round" style="height: 300px;"></div>
<script>
new Chartkick.ColumnChart("round-precision", [["A",1.2345],["B",0.12345],["C",0.012345]], {round: 2, precision: 3});
new Chartkick.ColumnChart("zeros-round", [["A",1],["B",1.2],["C",1.23],["D",1.234],["E",1.2345]], {round: 2, zeros: true});
</script>

<h1>Null Data</h1>
Expand Down

0 comments on commit 29c770e

Please sign in to comment.