Commit ec3a333f authored by MichaelZinsmaier's avatar MichaelZinsmaier

- switched to data hook

- removed require.js stuff
- moved options from line: {} back to curvedLine: {}
- resolved a bug with the fit option
- updated examples
parent 0c30f6cb
This diff is collapsed.
<div id="flotOrig"></div>
<script id="source" language="javascript" type="text/javascript">
$(function () { $(function () {
//<div id="flotOrig" style="width: 800;height: 400;"></div>
var d1 = [[20,20], [42,60], [54, 20], [80,80]]; var d1 = [[20,20], [42,60], [54, 20], [80,80]];
var options = { series: { var options = { series: {
...@@ -14,6 +14,5 @@ $(function () { ...@@ -14,6 +14,5 @@ $(function () {
yaxis: { min:10, max: 90} yaxis: { min:10, max: 90}
}; };
$.plot($("#flotOrig"), [{data: d1, curvedLines: { show: true, lineWidth: 3}}, {data: d1, points: { show: true }}], options); $.plot($("#flotOrig"), [{data: d1, lines: { show: true, lineWidth: 3}, curvedLines: {apply:true}}, {data: d1, points: { show: true }}], options);
}); });
</script> \ No newline at end of file
\ No newline at end of file
<div id="fillAndMultiAxis"></div>
<script id="source" language="javascript" type="text/javascript">
$(function () { $(function () {
//<div id="fillAndMultiAxis" style="width: 800;height: 400;"></div>
var d1 = [[20,20], [42,60], [54, 20], [80,80]]; var d1 = [[20,20], [42,60], [54, 20], [80,80]];
var d2 = [[20,700], [80,300]]; var d2 = [[20,700], [80,300]];
...@@ -17,8 +16,7 @@ ...@@ -17,8 +16,7 @@
$.plot($("#fillAndMultiAxis"), $.plot($("#fillAndMultiAxis"),
[ [
{data: d1, curvedLines: { show: true, fill: true, fillColor: "#C3C3C3", lineWidth: 3}}, {data: d1, points: { show: true }}, {data: d1, lines: { show: true, fill: true, fillColor: "#C3C3C3", lineWidth: 3}, curvedLines: {apply:true}}, {data: d1, points: { show: true }},
{data: d2, curvedLines: { show: true, lineWidth: 3}, yaxis:2}, {data: d2, points: { show: true }, yaxis:2} {data: d2, lines: { show: true, lineWidth: 3}, curvedLines: {apply:true}, yaxis:2}, {data: d2, points: { show: true }, yaxis:2}
], options); ], options);
}); });
</script> \ No newline at end of file
\ No newline at end of file
<div id="flotFit"></div>
<script id="source" language="javascript" type="text/javascript">
$(function () { $(function () {
//<div id="flotFit" style="width: 800;height: 400;"></div>
var d1 = [[20,20], [42,60], [54, 30], [80,80]]; var d1 = [[20,20], [42,60], [54, 30], [80,80]];
var options = { series: { var options = { series: {
...@@ -13,6 +13,5 @@ $(function () { ...@@ -13,6 +13,5 @@ $(function () {
yaxis: { min:10, max: 90} yaxis: { min:10, max: 90}
}; };
$.plot($("#flotFit"), [{data: d1, curvedLines: { show: true, fit: true, fitPointDist: 0.000001, lineWidth: 3}}, {data: d1, points: { show: true }}], options); $.plot($("#flotFit"), [{data: d1, lines: { show: true, lineWidth: 3}, curvedLines: {apply:true, fit: true, fitPointDist: 0.000001}}, {data: d1, points: { show: true }}], options);
}); });
</script> \ No newline at end of file
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment