basic table of stats and pie chart, working with nv.d3 charts - actually from Garren
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/11f321f5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/11f321f5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/11f321f5
Branch: refs/heads/fauxton
Commit: 11f321f537a7080cae65741393b9a975d789fbfd
Parents: 24ec3e9
Author: Simon Metson <simon+github@cloudant.com>
Authored: Sat Jan 26 12:17:59 2013 +0100
Committer: Simon Metson <simon+github@cloudant.com>
Committed: Sat Jan 26 12:17:59 2013 +0100
----------------------------------------------------------------------
src/fauxton/app/addons/stats/resources.js | 10 +-
src/fauxton/app/addons/stats/routes.js | 15 +-
.../app/addons/stats/templates/by_code.html | 3 -
.../app/addons/stats/templates/pie_table.html | 45 +
src/fauxton/app/addons/stats/templates/stats.html | 2 +
.../app/addons/stats/templates/statselect.html | 8 +
src/fauxton/app/addons/stats/views.js | 166 +-
src/fauxton/app/config.js | 2 +-
src/fauxton/app/templates/databases/sidebar.html | 3 +-
src/fauxton/app/templates/fauxton/nav_bar.html | 5 +-
src/fauxton/assets/css/nv.d3.css | 656 +
src/fauxton/assets/js/libs/nv.d3.js |11286 +++++++++++++++
src/fauxton/grunt.js | 2 +
13 files changed, 12153 insertions(+), 50 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/11f321f5/src/fauxton/app/addons/stats/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/resources.js b/src/fauxton/app/addons/stats/resources.js
index 7347ef8..ed2fd7f 100644
--- a/src/fauxton/app/addons/stats/resources.js
+++ b/src/fauxton/app/addons/stats/resources.js
@@ -1,9 +1,9 @@
define([
- "app",
- "api",
- "backbone",
- "lodash",
- "modules/fauxton/base"
+ "app",
+ "api",
+ "backbone",
+ "lodash",
+ "modules/fauxton/base"
],
function (app, FauxtonAPI, backbone, _, Fauxton) {
http://git-wip-us.apache.org/repos/asf/couchdb/blob/11f321f5/src/fauxton/app/addons/stats/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/routes.js b/src/fauxton/app/addons/stats/routes.js
index ec7b019..36c06e6 100644
--- a/src/fauxton/app/addons/stats/routes.js
+++ b/src/fauxton/app/addons/stats/routes.js
@@ -14,22 +14,19 @@ function(app, FauxtonAPI, Stats, Views) {
var routeCallback = function() {
return {
- layout: "two_pane",
+ layout: "with_sidebar",
data: data,
crumbs: [],
views: {
- "#left-content": new Views.Pie({
- collection: data.stats,
- template: "by_method",
- datatype: "httpd_request_methods"
+ "#sidebar-content": new Views.StatSelect({
+ collection: data.stats
}),
- "#right-content": new Views.Pie({
- collection: data.stats,
- template: "by_code",
- datatype: "httpd_status_codes"
+
+ "#dashboard-content": new Views.Statistics({
+ collection: data.stats
})
},
http://git-wip-us.apache.org/repos/asf/couchdb/blob/11f321f5/src/fauxton/app/addons/stats/templates/by_code.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/templates/by_code.html b/src/fauxton/app/addons/stats/templates/by_code.html
deleted file mode 100644
index 4414b07..0000000
--- a/src/fauxton/app/addons/stats/templates/by_code.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<h2>By Code <small>200, 201, 404, 409</small></h2>
-<div id="httpd_status_codes"></div>
-<b>Total requests:</b> <%= statistics.reduce(function(memo, d){return memo
+ d.get("sum"); }, 0) %>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/couchdb/blob/11f321f5/src/fauxton/app/addons/stats/templates/pie_table.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/templates/pie_table.html b/src/fauxton/app/addons/stats/templates/pie_table.html
new file mode 100644
index 0000000..a9be6f5
--- /dev/null
+++ b/src/fauxton/app/addons/stats/templates/pie_table.html
@@ -0,0 +1,45 @@
+<div class="row">
+ <div class="span8">
+ <h2> <%= datatype %> </h2>
+ </div>
+</div>
+
+<% if (datatype != "couchdb"){%>
+<div class="row">
+ <div class="span8" style="height:430px;">
+ <center>
+ <svg id="<%= datatype %>_graph"></svg>
+ </center>
+ </div>
+</div>
+<% } %>
+<div class="row">
+ <div class="span8">
+ <table class="table table-condensed table-striped">
+ <thead>
+ <tr>
+ <th> Description </th>
+ <th> current </th>
+ <th> sum </th>
+ <th> mean </th>
+ <th> stddev </th>
+ <th> min </th>
+ <th> max </th>
+ </tr>
+ </thead>
+ <% _.each (statistics, function (stat_line) {
+ if (stat_line.get("sum")){
+ %>
+ <tr>
+ <td><%= stat_line.get("description") %></td>
+ <td><%= stat_line.get("current") %></td>
+ <td><%= stat_line.get("sum") %></td>
+ <td><%= stat_line.get("mean") %></td>
+ <td><%= stat_line.get("stddev") %></td>
+ <td><%= stat_line.get("min") %></td>
+ <td><%= stat_line.get("max") %></td>
+ </tr>
+ <% }}) %>
+ </table>
+ </div>
+</div>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/11f321f5/src/fauxton/app/addons/stats/templates/stats.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/templates/stats.html b/src/fauxton/app/addons/stats/templates/stats.html
new file mode 100644
index 0000000..710315b
--- /dev/null
+++ b/src/fauxton/app/addons/stats/templates/stats.html
@@ -0,0 +1,2 @@
+<div class="datatypes">
+</div>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/11f321f5/src/fauxton/app/addons/stats/templates/statselect.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/templates/statselect.html b/src/fauxton/app/addons/stats/templates/statselect.html
new file mode 100644
index 0000000..aed0ee5
--- /dev/null
+++ b/src/fauxton/app/addons/stats/templates/statselect.html
@@ -0,0 +1,8 @@
+<% _.each(datatypes, function (datatype) { %>
+<li>
+<a href="#stats" class="datatype-select" data-type-select="<%= datatype %>">
+ <%= datatype %>
+ <i class="icon-chevron-right" style="float:right"></i>
+</a>
+</li>
+<% }); %>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/11f321f5/src/fauxton/app/addons/stats/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/views.js b/src/fauxton/app/addons/stats/views.js
index 517e0a3..701ad7b 100644
--- a/src/fauxton/app/addons/stats/views.js
+++ b/src/fauxton/app/addons/stats/views.js
@@ -2,50 +2,158 @@ define([
"app",
"api",
+ 'addons/stats/resources',
"d3",
- "rickshaw"
-],
+ "nv.d3"
-function(app, FauxtonAPI) {
+],
+function(app, FauxtonAPI,Stats) {
+ console.log(arguments);
Views = {};
+ datatypeEventer = {};
+ _.extend(datatypeEventer, Backbone.Events);
+
+ Views.Legend = FauxtonAPI.View.extend({
+ tagName: 'ul',
+ template: "addons/stats/templates/legend",
+
+ serialize: function () {
+ return {
+ legend_items: this.collection.toJSON()
+ };
+ }
+ });
+
Views.Pie = FauxtonAPI.View.extend({
+ className: "datatype-section",
+ template: 'addons/stats/templates/pie_table',
+
initialize: function(args){
- this.template = "addons/stats/templates/" + args.template;
this.datatype = args.datatype;
},
serialize: function() {
return {
- statistics: this.collection.where({type: this.datatype})
+ statistics: this.collection.where({type: this.datatype}),
+ datatype: this.datatype
};
},
afterRender: function(){
- var collection = this.collection;
- var chartelem = "#" + this.datatype;
- var series = _.map(this.collection.where({type: this.datatype}),
- function(d){
- // TODO: x should be a counter
- var point = {x: 0, y: d.get("sum") || 0, label: d.id};
- return point;
- }
- );
- series = _.filter(series, function(e){return e.y > 0;});
- var graph = new Rickshaw.Graph({
- element: document.querySelector(chartelem),
- width: 300,
- height: 300,
- renderer: "pie",
- outerRadius: 150,
- scheme: "spectrum14",
- series: [{
- data: series
- }]
- });
-
- graph.render();
+ if (this.datatypes != 'couchdb'){
+ var collection = this.collection,
+ chartelem = "#" + this.datatype + '_graph',
+ series = _.map(this.collection.where({type: this.datatype}),
+ function(d, counter){
+ // TODO: x should be a counter
+ var point = {
+ y: d.get("sum") || 0,
+ key: d.id
+ };
+ return point;
+ }
+ );
+
+ series = _.filter(series, function(d){return d.y > 0;});
+ series = _.sortBy(series, function(d){return -d.y;});
+
+ nv.addGraph(function() {
+ var width = 400,
+ height = 400;
+
+ var chart = nv.models.pieChart()
+ .x(function(d) { return d.key; })
+ .y(function(d) { return d.y; })
+ .showLabels(true)
+ .showLegend(false)
+ .values(function(d) { return d; })
+ .color(d3.scale.category10().range())
+ .width(width)
+ .height(height);
+
+ d3.select(chartelem)
+ .datum([series])
+ .transition().duration(300)
+ .attr('width', width)
+ .attr('height', height)
+ .call(chart);
+
+ return chart;
+ });
+
+ }
+ this.$el.addClass(this.datatype + '_section');
+ }
+ });
+
+ Views.StatSelect = FauxtonAPI.View.extend({
+ className: 'nav nav-tabs nav-stacked',
+ tagName: 'ul',
+
+ template: "addons/stats/templates/statselect",
+
+ initialize: function (options) {
+ this.rows = [];
+ },
+
+ events: {
+ 'click .datatype-select': "datatype_selected"
+ },
+
+ serialize: function () {
+ return {
+ datatypes: _.uniq(this.collection.pluck("type"))
+ };
+ },
+
+ afterRender: function () {
+ this.$('.datatype-select').first().addClass('active');
+ },
+
+ datatype_selected: function (event) {
+ var $target = $(event.currentTarget);
+
+ event.preventDefault();
+ event.stopPropagation();
+ this.$('.datatype-select').removeClass('active');
+ $target.addClass('active');
+ datatypeEventer.trigger('datatype-select', $target.attr('data-type-select'));
+ }
+ });
+
+ Views.Statistics = FauxtonAPI.View.extend({
+ className: "datatypes",
+ template: "addons/stats/templates/stats",
+
+ initialize: function (options) {
+ this.rows = [];
+ datatypeEventer.on('datatype-select', this.display_datatype, this);
+ },
+
+ serialize: function () {
+ return {
+ datatypes: _.uniq(this.collection.pluck("type"))
+ };
+ },
+
+ beforeRender: function () {
+ _.each(_.uniq(this.collection.pluck("type")), function(datatype) {
+ this.rows[datatype] = this.insertView(".datatypes", new Views.Pie({
+ collection: this.collection,
+ datatype: datatype
+ }));
+ }, this);
+ },
+
+ afterRender: function () {
+ this.$('.datatype-section').hide().first().toggle();
+ },
+
+ display_datatype: function (datatype) {
+ this.$('.datatype-section').hide();
+ this.$('.' + datatype + '_section').show();
}
});
return Views;
-});
\ No newline at end of file
+});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/11f321f5/src/fauxton/app/config.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/config.js b/src/fauxton/app/config.js
index f00df24..5bf1f87 100644
--- a/src/fauxton/app/config.js
+++ b/src/fauxton/app/config.js
@@ -17,7 +17,7 @@ require.config({
codemirror: "../assets/js/libs/codemirror",
jshint: "../assets/js/libs/jshint",
d3: "../assets/js/libs/d3",
- rickshaw: "../assets/js/libs/rickshaw"
+ "nv.d3": "../assets/js/libs/nv.d3"
},
shim: {
http://git-wip-us.apache.org/repos/asf/couchdb/blob/11f321f5/src/fauxton/app/templates/databases/sidebar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/databases/sidebar.html b/src/fauxton/app/templates/databases/sidebar.html
index ece24a1..bfa2351 100644
--- a/src/fauxton/app/templates/databases/sidebar.html
+++ b/src/fauxton/app/templates/databases/sidebar.html
@@ -8,4 +8,5 @@
<hr>
<div class="well">
<p>Here be news.</p>
-</div>
\ No newline at end of file
+</div>
+<img src="img/couchdblogo.png"/>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/couchdb/blob/11f321f5/src/fauxton/app/templates/fauxton/nav_bar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/fauxton/nav_bar.html b/src/fauxton/app/templates/fauxton/nav_bar.html
index c57f6b0..1974f85 100644
--- a/src/fauxton/app/templates/fauxton/nav_bar.html
+++ b/src/fauxton/app/templates/fauxton/nav_bar.html
@@ -13,7 +13,8 @@
<li><a href="<%= link.href %>"><%= link.title %></a></li>
<% }); %>
<!-- TODO: pick this up from code - nested dicts in the above -->
- <li class="dropdown">
+
+ <!-- <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">drsm79 <b
class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="account.html#account">Account Info</a></li>
@@ -26,7 +27,7 @@
<li class="divider"></li>
<li><a href="/sign-out.html">Sign Out</a></li>
</ul>
- </li>
+ </li> -->
</ul>
</div><!--/.nav-collapse -->
</div>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/11f321f5/src/fauxton/assets/css/nv.d3.css
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/css/nv.d3.css b/src/fauxton/assets/css/nv.d3.css
new file mode 100644
index 0000000..28ccd05
--- /dev/null
+++ b/src/fauxton/assets/css/nv.d3.css
@@ -0,0 +1,656 @@
+
+/********************
+ * HTML CSS
+ */
+
+
+.chartWrap {
+ margin: 0;
+ padding: 0;
+ overflow: hidden;
+}
+
+
+/********************
+ * TOOLTIP CSS
+ */
+
+.nvtooltip {
+ position: absolute;
+ background-color: rgba(255,255,255,1);
+ padding: 10px;
+ border: 1px solid #ddd;
+ z-index: 10000;
+
+ font-family: Arial;
+ font-size: 13px;
+
+ transition: opacity 500ms linear;
+ -moz-transition: opacity 500ms linear;
+ -webkit-transition: opacity 500ms linear;
+
+ transition-delay: 500ms;
+ -moz-transition-delay: 500ms;
+ -webkit-transition-delay: 500ms;
+
+ -moz-box-shadow: 4px 4px 8px rgba(0,0,0,.5);
+ -webkit-box-shadow: 4px 4px 8px rgba(0,0,0,.5);
+ box-shadow: 4px 4px 8px rgba(0,0,0,.5);
+
+ -moz-border-radius: 10px;
+ border-radius: 10px;
+
+ pointer-events: none;
+
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.nvtooltip h3 {
+ margin: 0;
+ padding: 0;
+ text-align: center;
+}
+
+.nvtooltip p {
+ margin: 0;
+ padding: 0;
+ text-align: center;
+}
+
+.nvtooltip span {
+ display: inline-block;
+ margin: 2px 0;
+}
+
+.nvtooltip-pending-removal {
+ position: absolute;
+ pointer-events: none;
+}
+
+
+/********************
+ * SVG CSS
+ */
+
+
+svg {
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ /* Trying to get SVG to act like a greedy block in all browsers */
+ display: block;
+ width:100%;
+ height:100%;
+}
+
+
+svg text {
+ font: normal 12px Arial;
+}
+
+svg .title {
+ font: bold 14px Arial;
+}
+
+.nvd3 .nv-background {
+ fill: white;
+ fill-opacity: 0;
+ /*
+ pointer-events: none;
+ */
+}
+
+.nvd3.nv-noData {
+ font-size: 18px;
+ font-weight: bolf;
+}
+
+
+/**********
+* Brush
+*/
+
+.nv-brush .extent {
+ fill-opacity: .125;
+ shape-rendering: crispEdges;
+}
+
+
+
+/**********
+* Legend
+*/
+
+.nvd3 .nv-legend .nv-series {
+ cursor: pointer;
+}
+
+.nvd3 .nv-legend .disabled circle {
+ fill-opacity: 0;
+}
+
+
+
+/**********
+* Axes
+*/
+
+.nvd3 .nv-axis path {
+ fill: none;
+ stroke: #000;
+ stroke-opacity: .75;
+ shape-rendering: crispEdges;
+}
+
+.nvd3 .nv-axis path.domain {
+ stroke-opacity: .75;
+}
+
+.nvd3 .nv-axis.nv-x path.domain {
+ stroke-opacity: 0;
+}
+
+.nvd3 .nv-axis line {
+ fill: none;
+ stroke: #000;
+ stroke-opacity: .25;
+ shape-rendering: crispEdges;
+}
+
+.nvd3 .nv-axis line.zero {
+ stroke-opacity: .75;
+}
+
+.nvd3 .nv-axis .nv-axisMaxMin text {
+ font-weight: bold;
+}
+
+.nvd3 .x .nv-axis .nv-axisMaxMin text,
+.nvd3 .x2 .nv-axis .nv-axisMaxMin text,
+.nvd3 .x3 .nv-axis .nv-axisMaxMin text {
+ text-anchor: middle
+}
+
+
+
+/**********
+* Brush
+*/
+
+.nv-brush .resize path {
+ fill: #eee;
+ stroke: #666;
+}
+
+
+
+/**********
+* Bars
+*/
+
+.nvd3 .nv-bars .negative rect {
+ zfill: brown;
+}
+
+.nvd3 .nv-bars rect {
+ zfill: steelblue;
+ fill-opacity: .75;
+
+ transition: fill-opacity 250ms linear;
+ -moz-transition: fill-opacity 250ms linear;
+ -webkit-transition: fill-opacity 250ms linear;
+}
+
+.nvd3 .nv-bars rect:hover {
+ fill-opacity: 1;
+}
+
+.nvd3 .nv-bars .hover rect {
+ fill: lightblue;
+}
+
+.nvd3 .nv-bars text {
+ fill: rgba(0,0,0,0);
+}
+
+.nvd3 .nv-bars .hover text {
+ fill: rgba(0,0,0,1);
+}
+
+
+/**********
+* Bars
+*/
+
+.nvd3 .nv-multibar .nv-groups rect,
+.nvd3 .nv-multibarHorizontal .nv-groups rect,
+.nvd3 .nv-discretebar .nv-groups rect {
+ stroke-opacity: 0;
+
+ transition: fill-opacity 250ms linear;
+ -moz-transition: fill-opacity 250ms linear;
+ -webkit-transition: fill-opacity 250ms linear;
+}
+
+.nvd3 .nv-multibar .nv-groups rect:hover,
+.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,
+.nvd3 .nv-discretebar .nv-groups rect:hover {
+ fill-opacity: 1;
+}
+
+.nvd3 .nv-discretebar .nv-groups text,
+.nvd3 .nv-multibarHorizontal .nv-groups text {
+ font-weight: bold;
+ fill: rgba(0,0,0,1);
+ stroke: rgba(0,0,0,0);
+}
+
+/***********
+* Pie Chart
+*/
+
+.nvd3.nv-pie path {
+ stroke-opacity: 0;
+
+ transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms
linear;
+ -moz-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms
linear;
+ -webkit-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity
250ms linear;
+
+}
+
+.nvd3.nv-pie .nv-slice text {
+ stroke: #000;
+ stroke-width: 0;
+}
+
+.nvd3.nv-pie path {
+ stroke: #fff;
+ stroke-width: 1px;
+ stroke-opacity: 1;
+}
+
+.nvd3.nv-pie .hover path {
+ fill-opacity: .7;
+/*
+ stroke-width: 6px;
+ stroke-opacity: 1;
+*/
+}
+
+.nvd3.nv-pie .nv-label rect {
+ fill-opacity: 0;
+ stroke-opacity: 0;
+}
+
+/**********
+* Lines
+*/
+
+.nvd3 .nv-groups path.nv-line {
+ fill: none;
+ stroke-width: 2.5px;
+ /*
+ stroke-linecap: round;
+ shape-rendering: geometricPrecision;
+
+ transition: stroke-width 250ms linear;
+ -moz-transition: stroke-width 250ms linear;
+ -webkit-transition: stroke-width 250ms linear;
+
+ transition-delay: 250ms
+ -moz-transition-delay: 250ms;
+ -webkit-transition-delay: 250ms;
+ */
+}
+
+.nvd3 .nv-groups path.nv-area {
+ stroke: none;
+ /*
+ stroke-linecap: round;
+ shape-rendering: geometricPrecision;
+
+ stroke-width: 2.5px;
+ transition: stroke-width 250ms linear;
+ -moz-transition: stroke-width 250ms linear;
+ -webkit-transition: stroke-width 250ms linear;
+
+ transition-delay: 250ms
+ -moz-transition-delay: 250ms;
+ -webkit-transition-delay: 250ms;
+ */
+}
+
+.nvd3 .nv-line.hover path {
+ stroke-width: 6px;
+}
+
+/*
+.nvd3.scatter .groups .point {
+ fill-opacity: 0.1;
+ stroke-opacity: 0.1;
+}
+ */
+
+.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point {
+ fill-opacity: 0;
+ stroke-opacity: 0;
+}
+
+.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point {
+ fill-opacity: .5 !important;
+ stroke-opacity: .5 !important;
+}
+
+
+.nvd3 .nv-groups .nv-point {
+ transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
+ -moz-transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
+ -webkit-transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
+}
+
+.nvd3.nv-scatter .nv-groups .nv-point.hover,
+.nvd3 .nv-groups .nv-point.hover {
+ stroke-width: 20px;
+ fill-opacity: .5 !important;
+ stroke-opacity: .5 !important;
+}
+
+
+.nvd3 .nv-point-paths path {
+ stroke: #aaa;
+ stroke-opacity: 0;
+ fill: #eee;
+ fill-opacity: 0;
+}
+
+
+
+.nvd3 .nv-indexLine {
+ cursor: ew-resize;
+}
+
+
+/**********
+* Distribution
+*/
+
+.nvd3 .nv-distribution {
+ pointer-events: none;
+}
+
+
+
+/**********
+* Scatter
+*/
+
+/* **Attempting to remove this for useVoronoi(false), need to see if it's required anywhere
+.nvd3 .nv-groups .nv-point {
+ pointer-events: none;
+}
+*/
+
+.nvd3 .nv-groups .nv-point.hover {
+ stroke-width: 20px;
+ stroke-opacity: .5;
+}
+
+.nvd3 .nv-scatter .nv-point.hover {
+ fill-opacity: 1;
+}
+
+/*
+.nv-group.hover .nv-point {
+ fill-opacity: 1;
+}
+*/
+
+
+/**********
+* Stacked Area
+*/
+
+.nvd3.nv-stackedarea path.nv-area {
+ fill-opacity: .7;
+ /*
+ stroke-opacity: .65;
+ fill-opacity: 1;
+ */
+ stroke-opacity: 0;
+
+ transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
+ -moz-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
+ -webkit-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
+
+ /*
+ transition-delay: 500ms;
+ -moz-transition-delay: 500ms;
+ -webkit-transition-delay: 500ms;
+ */
+
+}
+
+.nvd3.nv-stackedarea path.nv-area.hover {
+ fill-opacity: .9;
+ /*
+ stroke-opacity: .85;
+ */
+}
+/*
+.d3stackedarea .groups path {
+ stroke-opacity: 0;
+}
+ */
+
+
+
+.nvd3.nv-stackedarea .nv-groups .nv-point {
+ stroke-opacity: 0;
+ fill-opacity: 0;
+}
+
+.nvd3.nv-stackedarea .nv-groups .nv-point.hover {
+ stroke-width: 20px;
+ stroke-opacity: .75;
+ fill-opacity: 1;
+}
+
+
+
+/**********
+* Line Plus Bar
+*/
+
+.nvd3.nv-linePlusBar .nv-bar rect {
+ fill-opacity: .75;
+}
+
+.nvd3.nv-linePlusBar .nv-bar rect:hover {
+ fill-opacity: 1;
+}
+
+
+/**********
+* Bullet
+*/
+
+.nvd3.nv-bullet { font: 10px sans-serif; }
+.nvd3.nv-bullet .nv-measure { fill-opacity: .8; }
+.nvd3.nv-bullet .nv-measure:hover { fill-opacity: 1; }
+.nvd3.nv-bullet .nv-marker { stroke: #000; stroke-width: 2px; }
+.nvd3.nv-bullet .nv-markerTriangle { stroke: #000; fill: #fff; stroke-width: 1.5px; }
+.nvd3.nv-bullet .nv-tick line { stroke: #666; stroke-width: .5px; }
+.nvd3.nv-bullet .nv-range.nv-s0 { fill: #eee; }
+.nvd3.nv-bullet .nv-range.nv-s1 { fill: #ddd; }
+.nvd3.nv-bullet .nv-range.nv-s2 { fill: #ccc; }
+.nvd3.nv-bullet .nv-title { font-size: 14px; font-weight: bold; }
+.nvd3.nv-bullet .nv-subtitle { fill: #999; }
+
+
+.nvd3.nv-bullet .nv-range {
+ fill: #999;
+ fill-opacity: .4;
+}
+.nvd3.nv-bullet .nv-range:hover {
+ fill-opacity: .7;
+}
+
+
+
+/**********
+* Sparkline
+*/
+
+.nvd3.nv-sparkline path {
+ fill: none;
+}
+
+.nvd3.nv-sparklineplus g.nv-hoverValue {
+ pointer-events: none;
+}
+
+.nvd3.nv-sparklineplus .nv-hoverValue line {
+ stroke: #333;
+ stroke-width: 1.5px;
+ }
+
+.nvd3.nv-sparklineplus,
+.nvd3.nv-sparklineplus g {
+ pointer-events: all;
+}
+
+.nvd3 .nv-hoverArea {
+ fill-opacity: 0;
+ stroke-opacity: 0;
+}
+
+.nvd3.nv-sparklineplus .nv-xValue,
+.nvd3.nv-sparklineplus .nv-yValue {
+ /*
+ stroke: #666;
+ */
+ stroke-width: 0;
+ font-size: .9em;
+ font-weight: normal;
+}
+
+.nvd3.nv-sparklineplus .nv-yValue {
+ stroke: #f66;
+}
+
+.nvd3.nv-sparklineplus .nv-maxValue {
+ stroke: #2ca02c;
+ fill: #2ca02c;
+}
+
+.nvd3.nv-sparklineplus .nv-minValue {
+ stroke: #d62728;
+ fill: #d62728;
+}
+
+.nvd3.nv-sparklineplus .nv-currentValue {
+ /*
+ stroke: #444;
+ fill: #000;
+ */
+ font-weight: bold;
+ font-size: 1.1em;
+}
+
+/**********
+* historical stock
+*/
+
+.nvd3.nv-ohlcBar .nv-ticks .nv-tick {
+ stroke-width: 2px;
+}
+
+.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover {
+ stroke-width: 4px;
+}
+
+.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive {
+ stroke: #2ca02c;
+}
+
+.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative {
+ stroke: #d62728;
+}
+
+.nvd3.nv-historicalStockChart .nv-axis .nv-axislabel {
+ font-weight: bold;
+}
+
+.nvd3.nv-historicalStockChart .nv-dragTarget {
+ fill-opacity: 0;
+ stroke: none;
+ cursor: move;
+}
+
+.nvd3 .nv-brush .extent {
+ /*
+ cursor: ew-resize !important;
+ */
+ fill-opacity: 0 !important;
+}
+
+.nvd3 .nv-brushBackground rect {
+ stroke: #000;
+ stroke-width: .4;
+ fill: #fff;
+ fill-opacity: .7;
+}
+
+
+
+/**********
+* Indented Tree
+*/
+
+
+/**
+ * TODO: the following 3 selectors are based on classes used in the example. I should either
make them standard and leave them here, or move to a CSS file not included in the library
+ */
+.nvd3.nv-indentedtree .name {
+ margin-left: 5px;
+}
+
+.nvd3.nv-indentedtree .clickable {
+ color: #08C;
+ cursor: pointer;
+}
+
+.nvd3.nv-indentedtree span.clickable:hover {
+ color: #005580;
+ text-decoration: underline;
+}
+
+
+.nvd3.nv-indentedtree .nv-childrenCount {
+ display: inline-block;
+ margin-left: 5px;
+}
+
+.nvd3.nv-indentedtree .nv-treeicon {
+ cursor: pointer;
+ /*
+ cursor: n-resize;
+ */
+}
+
+.nvd3.nv-indentedtree .nv-treeicon.nv-folded {
+ cursor: pointer;
+ /*
+ cursor: s-resize;
+ */
+}
+
+
|