geostats - Javascript classification library samples
Github page - download (from github)
Sample 8 - a choropleth representation (using openlayers) with JSON input
Sample 9 - dynamic HTML legend with user input, feature count and callback function
Sample 10 - Handle unique values
Sample 11 - Reading shapefile and creating choropleth map from attribute data