jQuery UI Widgets Forums Chart Chart source format

This topic contains 4 replies, has 2 voices, and was last updated by  Dimitar 9 years, 9 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Chart source format #68437

    Yann
    Participant

    Hi.
    New to jqxchart, I need some help.
    A sql query returns a recordset that I encode to get a json object. My data look like this :

    month personal_id technician nb_planning
    3/2014 108 Eric RENIER 15
    3/2014 113 Renald LARUE 22
    3/2014 106 Pascal LECOQ 15
    3/2014 103 Arnaud DAUPHIN 15
    3/2014 110 Jean-Paul VALLEE 24
    3/2014 102 Elie CHAUVEAU 27
    3/2014 109 Pascal ROUSSEAU 14
    4/2014 106 Pascal LECOQ 16
    4/2014 103 Arnaud DAUPHIN 21
    4/2014 110 Jean-Paul VALLEE 43
    4/2014 102 Elie CHAUVEAU 40
    4/2014 109 Pascal ROUSSEAU 24
    4/2014 108 Eric RENIER 18
    4/2014 113 Renald LARUE 25
    5/2014 102 Elie CHAUVEAU 31
    5/2014 109 Pascal ROUSSEAU 41
    5/2014 108 Eric RENIER 22
    5/2014 113 Renald LARUE 29
    5/2014 106 Pascal LECOQ 15
    5/2014 103 Arnaud DAUPHIN 17
    5/2014 110 Jean-Paul VALLEE 39
    6/2014 113 Renald LARUE 23
    6/2014 106 Pascal LECOQ 24
    6/2014 103 Arnaud DAUPHIN 29
    6/2014 110 Jean-Paul VALLEE 47
    6/2014 102 Elie CHAUVEAU 47
    6/2014 109 Pascal ROUSSEAU 41
    6/2014 108 Eric RENIER 30
    7/2014 102 Elie CHAUVEAU 54
    7/2014 109 Pascal ROUSSEAU 18
    7/2014 108 Eric RENIER 36
    7/2014 113 Renald LARUE 26
    7/2014 106 Pascal LECOQ 15
    7/2014 103 Arnaud DAUPHIN 35
    7/2014 110 Jean-Paul VALLEE 53
    8/2014 108 Eric RENIER 8
    8/2014 113 Renald LARUE 20
    8/2014 106 Pascal LECOQ 19
    8/2014 103 Arnaud DAUPHIN 14
    8/2014 110 Jean-Paul VALLEE 27
    8/2014 102 Elie CHAUVEAU 18
    8/2014 109 Pascal ROUSSEAU 35
    9/2014 106 Pascal LECOQ 15
    9/2014 103 Arnaud DAUPHIN 35
    9/2014 110 Jean-Paul VALLEE 32
    9/2014 105 Kevin GORIN 17
    9/2014 102 Elie CHAUVEAU 59
    9/2014 109 Pascal ROUSSEAU 27
    9/2014 108 Eric RENIER 60
    9/2014 113 Renald LARUE 27
    10/2014 102 Elie CHAUVEAU 55
    10/2014 109 Pascal ROUSSEAU 34
    10/2014 108 Eric RENIER 23
    10/2014 113 Renald LARUE 29
    10/2014 106 Pascal LECOQ 24
    10/2014 103 Arnaud DAUPHIN 32
    10/2014 110 Jean-Paul VALLEE 54
    10/2014 105 Kevin GORIN 22
    11/2014 113 Renald LARUE 22
    11/2014 106 Pascal LECOQ 20
    11/2014 103 Arnaud DAUPHIN 21
    11/2014 110 Jean-Paul VALLEE 52
    11/2014 105 Kevin GORIN 23
    11/2014 102 Elie CHAUVEAU 30
    11/2014 109 Pascal ROUSSEAU 33
    11/2014 108 Eric RENIER 25
    12/2014 105 Kevin GORIN 26
    12/2014 2 Yann GLEVAREC 2
    12/2014 102 Elie CHAUVEAU 47
    12/2014 109 Pascal ROUSSEAU 43
    12/2014 108 Eric RENIER 34
    12/2014 113 Renald LARUE 25
    12/2014 106 Pascal LECOQ 24
    12/2014 103 Arnaud DAUPHIN 29
    12/2014 110 Jean-Paul VALLEE 41
    1/2015 108 Eric RENIER 31
    1/2015 113 Renald LARUE 25
    1/2015 106 Pascal LECOQ 22
    1/2015 103 Arnaud DAUPHIN 28
    1/2015 110 Jean-Paul VALLEE 48
    1/2015 105 Kevin GORIN 24
    1/2015 102 Elie CHAUVEAU 50
    1/2015 109 Pascal ROUSSEAU 36
    2/2015 103 Arnaud DAUPHIN 19
    2/2015 110 Jean-Paul VALLEE 44
    2/2015 105 Kevin GORIN 32
    2/2015 102 Elie CHAUVEAU 43
    2/2015 109 Pascal ROUSSEAU 25
    2/2015 2 Yann GLEVAREC 1
    2/2015 108 Eric RENIER 22
    2/2015 113 Renald LARUE 25
    2/2015 106 Pascal LECOQ 25
    3/2015 109 Pascal ROUSSEAU 18
    3/2015 2 Yann GLEVAREC 1
    3/2015 108 Eric RENIER 14
    3/2015 113 Renald LARUE 6
    3/2015 106 Pascal LECOQ 7
    3/2015 103 Arnaud DAUPHIN 7
    3/2015 110 Jean-Paul VALLEE 15
    3/2015 105 Kevin GORIN 11
    3/2015 102 Elie CHAUVEAU 13

    I woud like to chart these data with an xAxis based on “month” and a “line” for each technician.
    I don’t really know how to customize the jqxchart object to realize it. My several tests don’t give me the expected result.

    Thanks for your answers.

    Chart source format #68455

    Dimitar
    Participant

    Hello yglevarec@groupeks.com,

    We recommend re-formatting your data for it to be suitable to populate the jqxChart, e.g. (only partial data given):

    month EricRENIER RenaldLARUE PascalLECOQ ArnaudDAUPHIN Jean-PaulVALLEE ElieCHAUVEAU PascalROUSSEAU
    3/2014 15 22 15 15 24 27 14
    4/2014 18 25 16 21 43 40 24
    ...

    This would result in x-axis with months, y-axis with nb_planning and a series (line) for each technician.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    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.

    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 ?

    Chart source format #68583

    Dimitar
    Participant

    Hi Yann,

    When the data is loaded by data adapter, you may generate the series array dynamically. Such manipulations can be done in the data adapter’s beforeLoadComplete or loadComplete callbacks. The difference is that in beforeLoadComplete you can return a new data array, overriding the loaded one.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.