HTML chart output of Powershell

Hi,

Please see https://www.experts-exchange.com/questions/29078421/Powershell-Create-html-graph-of-trend-number-if-users-on-rds-in-time.html 

I 'm almost there using https://canvasjs.com/ (see index03.htm) but the output still is not what I'm looking for.

My question: see index04.html: I gather data every 2 hours of rds sessions, how do I get this in a correct overview, f.e. if data is gathered for 2 months the graph will get messy ....
More data will come, how do I present it correctly so I can see f.e. how many users there were 22 February at 10 AM?

Thanks for your input!
J.

Side note: I'll probably buy the software, but what about http://www.chartjs.org/ which is free, can I switch easily to it?
index03.htm
index04.htm
janhoedtAsked:
Who is Participating?
 
Dustin SaundersDirector of OperationsCommented:
What you might want to do is use a Drill Down chart.  Group the data by month or day, whatever, then the user can drill down into the hourly.

https://canvasjs.com/javascript-charts/drilldown-chart/

Alternatively, if you want to show that much data in a linear fashion-- consider a line chart with zoom and pan.
https://canvasjs.com/javascript-charts/line-chart-zoom-pan/
2
 
janhoedtAuthor Commented:
2 nd option looks best to me. However, did you look at my index04.htm in att? Will that work in that kind of chart?
Also, how I get data from several user groups in that chart?  F.e. in total there are 300 sessions, but team a has 100 sessions, team b 20, team c 80 etc. Because that's what I finally want to show in the chart ....
0
 
Dustin SaundersDirector of OperationsCommented:
Yeah, it will work with bar or line charts-- just add:
zoomEnabled: true,

Open in new window

under your
animationEnabled: true,

Open in new window

line.

You can add multiple series to a chart.  So if you look at data:, that's actually an array of series.  So heres a small example:

data: [{
		name: "TOTAL",
		type: "spline",
		showInLegend: true,
		dataPoints: [
			{ x: 1, y: 4},{ x: 2, y: 10}
		]
		
	},
	{
		name: "SUB GROUP 1",
		type: "spline",
		showInLegend: true,
		dataPoints: [
			{ x: 1, y: 3},{ x: 2, y: 5}
		]
		
	}
]

Open in new window


This would create 2 series of data.  All you need to do to add those is add a second set to the data: array.

Just a side note, guessing from the data on your example and the fact that it's January, when you use new Date(), the month is in 0-11 increments so your data show Feb.  new Date(2018,0,16) would be Jan 16, 2018.
1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.