Histogram Chart Properties (histogramProperties)

How to:

A histogram is a graphical representation that shows a visual impression of the distribution of data. The histogramProperties object controls the properties associated with the distribution of data.


Top of page

x
Syntax: How to Control Histogram Chart Properties
histogramProperties: {
   binCount: cnumber   binSize: bsize   startBinValue: snumber},

where:

cnumber

Is the number of group labels to draw, or undefined (automatic). The default value is undefined.

bsize

Is the size of the value range for assigning data values to a bin. Can be a number, an array of numbers (for variable bin sizes), or undefined (automatic). If binSize is an array, binCount is ignored and assumed to be the length of the binSize array. The default value is undefined.

snumber

Is a number to use as the first bin, or undefined (automatic). The default value is undefined.

Note:



Example: Setting the Histogram Bin Count

The following request against the GGSALES data source creates a vertical histogram (ON GRAPH SET LOOKGRAPH VHISTOGR) with a bin count of 5:

GRAPH FILE GGSALES
SUM UNITS
BY DOLLARS
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VHISTOGR
ON GRAPH SET STYLE *
*GRAPH_JS
histogramProperties: {
   binCount: 5,         
},
legend: {visible: false},
*END
INCLUDE=ENIADefault_combine.sty,$
ENDSTYLE
END

The output is:


WebFOCUS