How do I change the grid interval of the charts created?

Nov 5, 2010 at 3:42 AM

I use PAL to generate charts for daily (00:00 to 23:59) CPU utilization logs generated with perfmon. Currently it only splits the graph into 3 intervals, from the beginning to around 8:20AM, 8:20AM to around 4:40PM, and 4:40PM to the end. My manager would like to see it split into fixed 4 hour intervals instead.

This does not seem to be configurable, so I am trying to change it directly in the GenerateMSChart function, but to no avail. I tried setting AxisX.Interval and AxisX.MajorGrid.Interval, with the IntervalType set to "Hours", "Minutes", "Seconds", but it just wouldn't work :(

Nov 5, 2010 at 9:54 AM

Hi Philklc,

Thank you for the tip. I've been struggling with how to set the number of lables in the charts and you pointed me in the right direction.

I don't know how to answer you question directly, but based on your comment I added functionality in PAL to set the maximum number of interval labels displayed in the chart. I always felt that there was too few date/time lables in the charts. I set the default to 30 which is the same as the AUTO analysis interval. This changed the chart behavior to always have 30 labels unless there is less than 30 data points in the counter log. I will have this change in PAL v2.0.6.

Setting the chart to the nearest hour, minute, or seconds would be difficult, but if you find a way, I am willing to put it in.

I uploaded the changed PAL.ps1 file to my Microsoft Skydrive at:

Give it a go and let me know if it works for you.

Thank you,

Nov 8, 2010 at 7:43 AM
Edited Nov 8, 2010 at 7:50 AM

Hi ClintH,

Thanks for the modification! But now there's another problem. All 30 labels show up fine on the X axis when CHART_MAX_NUMBER_OF_AXIS_X_INTERVALS is 30, but when I start decreasing it, many of the labels are gone. If I set it to 20, only two labels show up, one at the middle, one at the end. If I set it to 6, no labels show up.

I also changed PAL.ps1 to allow changing the color palette of the chart which you can also add into the next version:

The way I added it in might not look good though since I'm new to PowerShell and .NET programming, feel free to change it.