Home forums Using CanvasJS Create a chart for use of number of RDS users & groups

This topic contains 4 replies, has 2 voices, and was last updated by  stevenbaert 8 months, 3 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #18968

    stevenbaert
    Member

    Hi,

    I would like to create an RDS overview of number of total of users per hour, for over a full year.
    Then I also would like to show the number of users per team.
    Got all data in Powershell (which gets it from a sql database).

    $Overview => type is System.Management.Automation.PSCustomObject

    $Overview
    GroupName Details
    ——— ——-
    Team01 {{ x: new Date(2018,1,29,14,00), y: 57 },{ x: new Date(2018,1,29,16,00), y: 20},}
    Team02 {{ x: new Date(2018,1,29,14,00), y: 3 },{ x: new Date(2018,1,29,17,00), y: 4 },}
    Team03 {{ x: new Date(2018,1,29,14,00), y: 9 },{ x: new Date(2018,1,29,18,00), y: 6 },}
    Team04 {{ x: new Date(2018,1,29,14,00), y: 5 },{ x: new Date(2018,1,29,19,00), y: 25 },}
    TOTAL {{ x: new Date(2018,1,29,14,00), y: 74},{ x: new Date(2018,1,29,20,00), y: 55 },}

    I found this chart: https://canvasjs.com/javascript-charts/multi-series-chart/
    which could show the different teams and stats, but how do I get
    the $Overview into the html in a decent way now?
    Could import the html via Get-Content -Path C:\path\to\my\file.txt but then still my data $overview won’t be in it.

    Thanks for your input.
    Steven

    #18983

    Suyash Singh
    Participant

    @stevenbaert,

    Can you please share a sample project along with sample data reproducing the issue that you are facing and share it over one drive(or any other similar service) so that we can understand your code better and help you out?

    ___
    Suyash Singh
    Team CanvasJS

    #19239

    stevenbaert
    Member

    Hi,

    Thanks! However, figured it out meanwhile but do have another question.
    My date notation is wrong, although I use f.e. { x: new Date(2018,1,30,20,0), y: 133 } it shows month as March.
    Can you help me with that?

    Hope screenshot clarifies it:
    Month 1 is showing as March

    https://www.dropbox.com/s/in035b263k3mklf/Screenshot_1.jpg?dl=0
    S.

    • This reply was modified 8 months, 3 weeks ago by  stevenbaert.
    #19283

    Suyash Singh
    Participant

    @stevenbaert,

    In JavaScript month starts from 0 instead of 1. So new Date(2018, 2, 1) would be Mar 02 2018(as February 2018 has 28 days). Please take a look at this link on JavaScript Dates for more info.

    ___
    Suyash Singh
    Team CanvasJS

    #19292

    stevenbaert
    Member

    Thanks, just what I needed!

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

You must be logged in to reply to this topic.