Hallo,
ich arbeite mit jQuery und hab da einen Code den ich nicht verstehe:
$("#placeholder").bind("plotselected", function (event, ranges) {
// clamp the zooming to prevent eternal zoom
if (ranges.xaxis.to - ranges.xaxis.from < 0.00001)
ranges.xaxis.to = ranges.xaxis.from + 0.00001;
if (ranges.yaxis.to - ranges.yaxis.from < 0.00001)
ranges.yaxis.to = ranges.yaxis.from + 0.00001;
// do the zooming
plot = $.plot($("#placeholder"), getData(ranges.xaxis.from, ranges.xaxis.to),
$.extend(true, {}, options, {
xaxis: { min: ranges.xaxis.from, max: ranges.xaxis.to },
yaxis: { min: ranges.yaxis.from, max: ranges.yaxis.to }
}));
// don't fire event on the overview to prevent eternal loop
overview.setSelection(ranges, true);
});
Mir ist nicht ganz klar, wer die Funktion function (event, ranges) aufruft und wo "ranges" herkommt.
Das Beispiel ist von diesen Link:
http://people.iola.dk/olau/flot/examples/visitors.html
Vielen Dank für eteaige Hilfe,
lg