Histogram Chart Properties (histogramProperties)

How to:

A histogram is a graphical representation of the frequency 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: number   binSize: size   startBinValue: number},

where:

binCount: number

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

binSize: size

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.

startBinValue: number

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 creates a vertical histogram (ON GRAPH SET LOOKGRAPH VHISTOGR) with a bin count of 5:

GRAPH FILE WFLITE
PRINT  REVENUE_US 
BY COGS_US
ON GRAPH HOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VHISTOGR
ON GRAPH SET STYLE *
*GRAPH_JS
histogramProperties: {
   binCount: 5,
},
legend: {visible: false},
*END
INCLUDE=ENDEFLT,$
ENDSTYLE
END

The output is:


Information Builders