From 7d2283f9a30a87972ea54e3127db9ac5fa25a540 Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Fri, 22 Jul 2016 10:24:22 -0400 Subject: [PATCH] apply bootstrap styling and description for #1166 --- web/examples/adjustable-threshold.html | 36 +++++++++++++++----------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/web/examples/adjustable-threshold.html b/web/examples/adjustable-threshold.html index b0ba58452..1036f275b 100644 --- a/web/examples/adjustable-threshold.html +++ b/web/examples/adjustable-threshold.html @@ -1,18 +1,23 @@ - - - - - + + dc.js - Adjustable Threshold Example + + + + + - + +
+ + +

This example demonstrates assigning a threshold dynamically to a pie chart by creating a new dimension based on slider input.

- - Score threshold: - +
+ Score threshold: 0.5
@@ -25,8 +30,8 @@ { "book": "D", "scores": 27 }, { "book": "E", "scores": 70 }, { "book": "F", "scores": 25 }, - { "book": "G", "scores": 92 }, - { "book": "H", "scores": 22 }, + { "book": "G", "scores": 92 }, + { "book": "H", "scores": 22 }, { "book": "I", "scores": 40 }, { "book": "J", "scores": 10 }, { "book": "K", "scores": 40 } @@ -43,7 +48,7 @@ var all = ndx.groupAll(); var bookDimension = ndx.dimension(function (d) {return d.book;}), bookscoresGroup = bookDimension.group().reduceSum(function(d) {return d.scores;}); - + //## score bar chart scoreChart.width(320) .height(320) @@ -51,10 +56,10 @@ .group(bookscoresGroup) .elasticY(true) .x(d3.scale.ordinal()) - .xUnits(dc.units.ordinal) + .xUnits(dc.units.ordinal) .colors(["orange"]) .yAxis().ticks(5); - + //## pie chart // reusable function to create threshold dimension function coreCount_from_threshold() { @@ -110,5 +115,6 @@ } +
- \ No newline at end of file +