I don’t have an easy way for you to add a chart to a stock report, but it’s easy to do for a custom report so I would just create a custom report instead. It shouldn’t take too long to set up and I’ve done the hard work for you already. All you need to do is create a new custom report with the code below. Of course you will want to modify it to change values, colors, chart size, etc., and you might want to wrap it in some additional HTML or even include it in a report like the one discussed here: http://forum.bigfix.com/viewtopic.php?id=212
There is no error checking in above script. You may need to add some to deal with certain cases.
The values are hard coded. I would actually generate these using relevance. Something like this:
// Set the values.
<?relevance
javascript array "the_values" of multiplicities of unique values of values of (results ( it, bes property "OS" ))
of bes computers
whose
(
exists result
(
it, bes property "OS"
)
whose
(
exists value of it AND error flag of it = false AND exists tuple string item 0 of value of it
)
)
?>
// Set the categories
<?relevance
javascript array "the_categories" of unique values of values of (results ( it, bes property "OS" ))
of bes computers
whose
(
exists result
(
it, bes property "OS"
)
whose
(
exists value of it AND error flag of it = false AND exists tuple string item 0 of value of it
)
)
?>
The attachment shows an example of the graph this report produces
very nice jessewk, but mine isn’t showing all results in the legend. Any way it can either be sorted by number of resut (not alphabetical), or just show all?
The relevance language doesn’t currently support sorting (although a really nice feature that makes javascript sorting of relevance results super fast is coming in 8.0).
If you want to sort it first you’d have to loop through the results and sort them in javascript before passing the array to the chart control.