Skip to content

Instantly share code, notes, and snippets.

@danswater
Last active November 16, 2017 07:15
Show Gist options
  • Save danswater/33240de8eb62b2e65a753028f45d98d2 to your computer and use it in GitHub Desktop.
Save danswater/33240de8eb62b2e65a753028f45d98d2 to your computer and use it in GitHub Desktop.

Revisions

  1. danswater revised this gist Nov 16, 2017. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -85,20 +85,20 @@
    "data" : [ {
    "key" : "Submitted",
    "values" : [ {
    "label" : "Submitted",
    "value" : 0.00
    "x" : "Submitted",
    "y" : 0.00
    } ]
    }, {
    "key" : "Approved",
    "values" : [ {
    "label" : "Approved",
    "value" : 8.00
    "x" : "Approved",
    "y" : 8.00
    } ]
    }, {
    "key" : "Rejected",
    "values" : [ {
    "label" : "Approved",
    "value" : 0.00
    "x" : "Approved",
    "y" : 0.00
    } ]
    } ]
    }
  2. danswater revised this gist Nov 16, 2017. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -85,20 +85,20 @@
    "data" : [ {
    "key" : "Submitted",
    "values" : [ {
    "name" : "Submitted",
    "hours" : "0.00"
    "label" : "Submitted",
    "value" : 0.00
    } ]
    }, {
    "key" : "Approved",
    "values" : [ {
    "name" : "Approved",
    "hours" : "8.00"
    "label" : "Approved",
    "value" : 8.00
    } ]
    }, {
    "key" : "Rejected",
    "values" : [ {
    "name" : "Approved",
    "hours" : "0.00"
    "label" : "Approved",
    "value" : 0.00
    } ]
    } ]
    }
  3. danswater revised this gist Nov 16, 2017. 1 changed file with 76 additions and 86 deletions.
    162 changes: 76 additions & 86 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -5,9 +5,9 @@

    ```json
    {
    "className" : "h4",
    "enable" : true,
    "text" : "Monthly Timelog"
    "className" : "h4",
    "enable" : true,
    "text" : "Monthly Timelog"
    }
    ```

    @@ -16,100 +16,90 @@

    ```json
    {
    "type" : "multiBarChart",
    "height" : 350,
    "margin" : {
    "top" : 20,
    "right" : 20,
    "bottom" : 45,
    "left" : 45
    },
    "clipEdge" : true,
    "duration" : 500,
    "stacked" : false,
    "showControls" : false,
    "noData" : "No data available",
    "xAxis" : {
    "axisLabel" : "Jobs Status",
    "showMaxMin" : false
    },
    "yAxis" : {
    "axisLabel" : "Hours",
    "axisLabelDistance" : -20
    }
    "type" : "multiBarChart",
    "height" : 350,
    "margin" : {
    "top" : 20,
    "right" : 20,
    "bottom" : 45,
    "left" : 45
    },
    "clipEdge" : true,
    "duration" : 500,
    "stacked" : false,
    "showControls" : false,
    "noData" : "No data available",
    "xAxis" : {
    "axisLabel" : "Jobs Status",
    "showMaxMin" : false
    },
    "yAxis" : {
    "axisLabel" : "Hours",
    "axisLabelDistance" : -20
    }
    }
    ```

    #### Request payload
    ```json
    {
    "Interval": "monthly",
    "UserId" : 1,
    "Date": "2016-11-01",
    "Tab": "mylogs",
    "Graph" : "bar"
    "Interval" : "monthly",
    "UserId" : 1,
    "Date" : "2016-11-01",
    "Tab" : "mylogs",
    "Graph" : "bar"
    }
    ```

    #### Example response
    ```json
    {
    "title" : {
    "className" : "h4",
    "enable" : true,
    "text" : "Monthly Timelog"
    },
    "chart" : {
    "type" : "multiBarChart",
    "height" : 350,
    "margin" : {
    "top" : 20,
    "right" : 20,
    "bottom" : 45,
    "left" : 45
    },
    "clipEdge" : true,
    "duration" : 500,
    "stacked" : false,
    "showControls" : false,
    "noData" : "No data available",
    "xAxis" : {
    "axisLabel" : "Jobs Status",
    "showMaxMin" : false
    },
    "yAxis" : {
    "axisLabel" : "Hours",
    "axisLabelDistance" : -20
    }
    },
    "data" : [
    {
    "key" : "Submitted",
    "values" : [
    {
    "name" : "Submitted",
    "hours" : "0.00"
    }
    ]
    },
    {
    "key" : "Approved",
    "values" : [
    {
    "name" : "Approved",
    "hours" : "8.00"
    }
    ]
    },
    {
    "key" : "Rejected",
    "values" : [
    {
    "name" : "Approved",
    "hours" : "0.00"
    }
    ]
    }
    ]
    "title" : {
    "className" : "h4",
    "enable" : true,
    "text" : "Monthly Timelog"
    },
    "chart" : {
    "type" : "multiBarChart",
    "height" : 350,
    "margin" : {
    "top" : 20,
    "right" : 20,
    "bottom" : 45,
    "left" : 45
    },
    "clipEdge" : true,
    "duration" : 500,
    "stacked" : false,
    "showControls" : false,
    "noData" : "No data available",
    "xAxis" : {
    "axisLabel" : "Jobs Status",
    "showMaxMin" : false
    },
    "yAxis" : {
    "axisLabel" : "Hours",
    "axisLabelDistance" : -20
    }
    },
    "data" : [ {
    "key" : "Submitted",
    "values" : [ {
    "name" : "Submitted",
    "hours" : "0.00"
    } ]
    }, {
    "key" : "Approved",
    "values" : [ {
    "name" : "Approved",
    "hours" : "8.00"
    } ]
    }, {
    "key" : "Rejected",
    "values" : [ {
    "name" : "Approved",
    "hours" : "0.00"
    } ]
    } ]
    }
    ```
  4. danswater revised this gist Nov 16, 2017. 1 changed file with 12 additions and 1 deletion.
    13 changes: 12 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,16 @@
    ## Timelogs in Bar Graph

    #### Container options
    <sup>This should be appended to response as `title`<sub>.

    ```json
    {
    "className" : "h4",
    "enable" : true,
    "text" : "Monthly Timelog"
    }
    ```

    #### Bar Graph options
    <sup>This should be appended to response as `chart`<sub>.

    @@ -40,7 +51,7 @@
    }
    ```

    #### Response
    #### Example response
    ```json
    {
    "title" : {
  5. danswater revised this gist Nov 16, 2017. 1 changed file with 23 additions and 0 deletions.
    23 changes: 23 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -48,6 +48,29 @@
    "enable" : true,
    "text" : "Monthly Timelog"
    },
    "chart" : {
    "type" : "multiBarChart",
    "height" : 350,
    "margin" : {
    "top" : 20,
    "right" : 20,
    "bottom" : 45,
    "left" : 45
    },
    "clipEdge" : true,
    "duration" : 500,
    "stacked" : false,
    "showControls" : false,
    "noData" : "No data available",
    "xAxis" : {
    "axisLabel" : "Jobs Status",
    "showMaxMin" : false
    },
    "yAxis" : {
    "axisLabel" : "Hours",
    "axisLabelDistance" : -20
    }
    },
    "data" : [
    {
    "key" : "Submitted",
  6. danswater revised this gist Nov 16, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    ## Timelogs in Bar Graph

    #### Bar Graph options
    <sup>This should be appended to response as `chart`<sub>
    <sup>This should be appended to response as `chart`<sub>.

    ```json
    {
  7. danswater revised this gist Nov 16, 2017. 1 changed file with 18 additions and 19 deletions.
    37 changes: 18 additions & 19 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -5,27 +5,26 @@

    ```json
    {
    'type' : 'multiBarChart',
    'height' : 350,
    'margin' : {
    'top' : 20,
    'right' : 20,
    'bottom' : 45,
    'left' : 45
    "type" : "multiBarChart",
    "height" : 350,
    "margin" : {
    "top" : 20,
    "right" : 20,
    "bottom" : 45,
    "left" : 45
    },
    'clipEdge' : true,
    'duration' : 500,
    'stacked' : false,
    'showControls' : false,
    'noData' : 'No data available',
    'xAxis' : {
    'axisLabel' : 'Jobs Status',
    'showMaxMin' : false
    "clipEdge" : true,
    "duration" : 500,
    "stacked" : false,
    "showControls" : false,
    "noData" : "No data available",
    "xAxis" : {
    "axisLabel" : "Jobs Status",
    "showMaxMin" : false
    },

    'yAxis' : {
    'axisLabel' : 'Hours',
    'axisLabelDistance' : -20
    "yAxis" : {
    "axisLabel" : "Hours",
    "axisLabelDistance" : -20
    }
    }
    ```
  8. danswater revised this gist Nov 16, 2017. 1 changed file with 28 additions and 1 deletion.
    29 changes: 28 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,34 @@
    ## Timelogs in Bar Graph

    #### Bar Graph options
    <sup>This should be appended to response<sub>
    <sup>This should be appended to response as `chart`<sub>

    ```json
    {
    'type' : 'multiBarChart',
    'height' : 350,
    'margin' : {
    'top' : 20,
    'right' : 20,
    'bottom' : 45,
    'left' : 45
    },
    'clipEdge' : true,
    'duration' : 500,
    'stacked' : false,
    'showControls' : false,
    'noData' : 'No data available',
    'xAxis' : {
    'axisLabel' : 'Jobs Status',
    'showMaxMin' : false
    },

    'yAxis' : {
    'axisLabel' : 'Hours',
    'axisLabelDistance' : -20
    }
    }
    ```

    #### Request payload
    ```json
  9. danswater revised this gist Nov 16, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    ## Timelogs in Bar Graph

    #### Bar Graph options
    This should be appended to response
    <sup>This should be appended to response<sub>

    #### Request payload
    ```json
  10. danswater revised this gist Nov 16, 2017. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,8 @@
    ## Timelogs in Bar Graph

    #### Bar Graph options
    This should be appended to response

    #### Request payload
    ```json
    {
  11. danswater revised this gist Nov 16, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -49,4 +49,4 @@
    }
    ]
    }
    ```json
    ```
  12. danswater revised this gist Nov 16, 2017. 1 changed file with 4 additions and 9 deletions.
    13 changes: 4 additions & 9 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -11,14 +11,8 @@
    }
    ```

    // response
    {
    "HoursSpentApproved" : "8.00",
    "HoursSpentRejected" : "0.00",
    "HoursSpentSubmitted" : "0.00"
    }

    // view model
    #### Response
    ```json
    {
    "title" : {
    "className" : "h4",
    @@ -54,4 +48,5 @@
    ]
    }
    ]
    }
    }
    ```json
  13. danswater revised this gist Nov 16, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ## Timelogs in Bar Graph

    ### Request
    #### Request payload
    ```json
    {
    "Interval": "monthly",
  14. danswater revised this gist Nov 16, 2017. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,15 @@
    ### Timelogs in Bar Graph
    ## Timelogs in Bar Graph

    ### Request
    ```json
    {
    "Interval": "monthly",
    "UserId" : 1,
    "Date": "2016-11-01",
    "Tab": "mylogs",
    "Graph" : "bar"
    }
    ```

    // response
    {
  15. danswater revised this gist Nov 16, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    ## Timelogs in Bar Graph
    // request
    ### Timelogs in Bar Graph

    {
    "Interval": "monthly",
    "UserId" : 1,
  16. danswater revised this gist Nov 16, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    // BAR GRAPH
    ## Timelogs in Bar Graph
    // request
    {
    "Interval": "monthly",
  17. danswater created this gist Nov 16, 2017.
    54 changes: 54 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,54 @@
    // BAR GRAPH
    // request
    {
    "Interval": "monthly",
    "UserId" : 1,
    "Date": "2016-11-01",
    "Tab": "mylogs",
    "Graph" : "bar"
    }

    // response
    {
    "HoursSpentApproved" : "8.00",
    "HoursSpentRejected" : "0.00",
    "HoursSpentSubmitted" : "0.00"
    }

    // view model
    {
    "title" : {
    "className" : "h4",
    "enable" : true,
    "text" : "Monthly Timelog"
    },
    "data" : [
    {
    "key" : "Submitted",
    "values" : [
    {
    "name" : "Submitted",
    "hours" : "0.00"
    }
    ]
    },
    {
    "key" : "Approved",
    "values" : [
    {
    "name" : "Approved",
    "hours" : "8.00"
    }
    ]
    },
    {
    "key" : "Rejected",
    "values" : [
    {
    "name" : "Approved",
    "hours" : "0.00"
    }
    ]
    }
    ]
    }