jQWidgets Forums

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Chart doesn't render Chart doesn't render #68524

    Yann
    Participant

    It works Peter.
    The objects declaration was not on the right place.

    in reply to: Chart doesn't render Chart doesn't render #68523

    Yann
    Participant

    To be more comprehensive, I try do something like that :

    var myDatafields = [];
    var field = new Object();
    var mySeries = [];
    var serie = new Object();
    $.each(result, function(k,v){
    if(i==0){
    field.name=k;
    field.type=’string’;
    myDatafields.push(field);
    }else{
    field.name=k;
    field.type=’int’;
    myDatafields.push(field);
    serie.dataField=k;
    serie.displayText=k;
    mySeries.push(serie);
    }
    i++;
    });

    in reply to: Chart doesn't render Chart doesn't render #68522

    Yann
    Participant

    Thanks Peter.
    I followed your explanation and it works.
    Now I would like to make it totally dynamic, I mean a dynamic datafields param for the source and dynamic series.
    Can I build arrays for datafields param and series ?
    Thanks in advance.

    in reply to: Chart doesn't render Chart doesn't render #68518

    Yann
    Participant

    Hi Peter.
    My data format is not a json object but an array. As you can see, data returned by ajax call is converted in an array :source_data = $.makeArray(data);

    in reply to: Chart source format Chart source format #68463

    Yann
    Participant

    Your answer induces a new question :
    How to declare setup multiple series when you don’t know in advance its number and their names ?

    in reply to: Chart source format Chart source format #68457

    Yann
    Participant

    Hi Dimitar and thanks for your answer.
    My original data representation was based on a “simple” sql query. Re-formatting will need some manipulations.

Viewing 6 posts - 1 through 6 (of 6 total)