src/zoomable-circles-demo.js
function loadData(dataUrl, jsonEditor) {

    // jQuery getJSON will read the file from a Web resources.
    $.getJSON(dataUrl, function(data) {
    //$.getJSON('data/simple-zoomable-circle.json', function(data) {
        // set data to JSON editor.
        jsonEditor.set(data);
        // update the JSON source code
        $('#jsonstring').html(JSON.stringify(data, null, 2));
        // remove the existing one.
        $('#svgpreview').empty();
        // build the circles...
        var options = {
          "margin":10,
          "diameter":500
        };
        $("#svgpreview").zoomableCircles(options, data);
        //console.log(JSON.stringify(data));
    });
}
function loadData(dataUrl, jsonEditor) {

    // jQuery getJSON will read the file from a Web resources.
    $.getJSON(dataUrl, function(data) {
    //$.getJSON('data/simple-zoomable-circle.json', function(data) {
        // set data to JSON editor.
        jsonEditor.set(data);
        // update the JSON source code
        $('#jsonstring').html(JSON.stringify(data, null, 2));
        // remove the existing one.
        $('#svgpreview').empty();
        // build the circles...
        var options = {
          "margin":10,
          "diameter":500
        };
        $("#svgpreview").zoomableCircles(options, data);
        //console.log(JSON.stringify(data));
    });
}
function loadData ( dataUrl , jsonEditor ) { // jQuery getJSON will read the file from a Web resources. $ . getJSON ( dataUrl , function ( data ) { //$.getJSON('data/simple-zoomable-circle.json', function(data) { // set data to JSON editor. jsonEditor . set ( data ) ; // update the JSON source code $ ( '#jsonstring' ) . html ( JSON . stringify ( data , null , 2 ) ) ; // remove the existing one. $ ( '#svgpreview' ) . empty ( ) ; // build the circles... var options = { "margin" : 10 , "diameter" : 500 } ; $ ( "#svgpreview" ) . zoomableCircles ( options , data ) ; //console.log(JSON.stringify(data)); } ) ; }
load data from the given url, set it to JSON editor and load
the zoomable circles.
load data from the given url set it to JSON editor and load the zoomable circles .