Switched from jqplot to nv.d3.
This commit is contained in:
parent
a52e79b930
commit
7b9eae28e5
@ -26,41 +26,45 @@
|
||||
<!-- Bootstrap datepicker plugin CSS -->
|
||||
<link href="third-party/datepicker/css/datepicker.css" rel="stylesheet" media="screen">
|
||||
|
||||
<!-- JQPlot CSS -->
|
||||
<link href="third-party/jqplot/jquery.jqplot.min.css" rel="stylesheet" type="text/css">
|
||||
<!-- NVD3 CSS -->
|
||||
<link href="third-party/nv.d3/nv.d3.css" rel="stylesheet" media="screen">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<!-- Navbar with accounts -->
|
||||
<div class="navbar navbar-fixed-top">
|
||||
<!-- Navbar with accounts and menu -->
|
||||
<div id="top-navbar" class="navbar navbar-fixed-top">
|
||||
<div class="navbar-inner" ng-controller="AccountController">
|
||||
<!-- Title -->
|
||||
<a class="brand" href="#"> Comptes</a>
|
||||
<a class="brand" href="#"> Accountant</a>
|
||||
|
||||
<!-- Account list -->
|
||||
<div class="nav" ng-repeat="account in accounts">
|
||||
<div class="btn-group">
|
||||
<!-- Account button -->
|
||||
<button class="btn btn-nav" ng-class="accountClass(account)" ng-click="selectAccount(account)">{{account.name}} (<span ng-class="valueClass(account, account.current)">{{account.current}}</span> / <span ng-class="valueClass(account, account.pointed)">{{account.pointed}}</span>)</button>
|
||||
<!-- Dropdown button -->
|
||||
<button class="btn btn-nav dropdown-toggle" data-toggle="dropdown"><b class="caret"></b></button>
|
||||
<ul class="nav">
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Comptes <span class="caret"></span></a>
|
||||
|
||||
<!-- Dropdown menu -->
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" ng-click="editAccount(account)" bs-modal="'templates/account_edit.html'">Modifier</a></li>
|
||||
<li><a href="#" bs-modal="'templates/account_remove.html'">Supprimer</a></li>
|
||||
<!-- Account list -->
|
||||
<li class="dropdown-submenu" ng-repeat="account in accounts">
|
||||
<a ng-class="accountClass(account)" ng-click="selectAccount(account)" href="#">{{account.name}} (<span ng-class="valueClass(account, account.current)">{{account.current}}</span> / <span ng-class="valueClass(account, account.pointed)">{{account.pointed}}</span>)</a>
|
||||
|
||||
<!-- Dropdown menu -->
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" ng-click="editAccount(account)" bs-modal="'templates/account_edit.html'">Modifier</a></li>
|
||||
<li><a href="#" bs-modal="'templates/account_remove.html'">Supprimer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<!-- New account button -->
|
||||
<li>
|
||||
<a bs-modal="'templates/account_new.html'" href="#">Ajouter un compte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- New account button -->
|
||||
<div class="btn btn-nav">
|
||||
<a bs-modal="'templates/account_new.html'" href="#"><i class="icon-plus"></i></a>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -74,18 +78,22 @@
|
||||
</div>
|
||||
|
||||
<!-- Emtpy row with top margin to avoid data under the fixed top navbar -->
|
||||
<div class="row-fluid" style="margin-top: 46px"></div>
|
||||
<div id="top-navbar-margin" class="row-fluid" style="margin-top: 46px"></div>
|
||||
|
||||
<!-- Chart row -->
|
||||
<div class="row-fluid">
|
||||
<!-- Sold evolution chart placeholder -->
|
||||
<div class="span8">
|
||||
<div id="entries-chart-placeholder"></div>
|
||||
<div id="entries-chart-placeholder">
|
||||
<svg style='height:300px'/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Expense category piechart -->
|
||||
<div class="span4">
|
||||
<div id="expense-categories-chart-placeholder"></div>
|
||||
<div id="expense-categories-chart-placeholder">
|
||||
<svg style='height:300px'/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -153,9 +161,7 @@
|
||||
</div>
|
||||
|
||||
<!-- JQuery Javascript library -->
|
||||
<script type="text/javascript" src="third-party/jquery/jquery.min.js"></script>
|
||||
<!-- JQuery migrate plugin. Mandatory for JQPlot. -->
|
||||
<script type="text/javascript" src="third-party/jquery/jquery-migrate.min.js"></script>
|
||||
<script type="text/javascript" src="third-party/jquery/jquery.js"></script>
|
||||
|
||||
<!-- Bootstrap Javascript library -->
|
||||
<script type="text/javascript" src="third-party/bootstrap/js/bootstrap.min.js"></script>
|
||||
@ -167,15 +173,11 @@
|
||||
<script type="text/javascript" src="third-party/angular/angular.min.js"></script>
|
||||
<script type="text/javascript" src="third-party/angular/angular-strap.min.js"></script>
|
||||
|
||||
<!-- JQPlot Javascript library and needed modules -->
|
||||
<script type="text/javascript" src="third-party/jqplot/jquery.jqplot.js"></script>
|
||||
<script type="text/javascript" src="third-party/jqplot/plugins/jqplot.dateAxisRenderer.js"></script>
|
||||
<script type="text/javascript" src="third-party/jqplot/plugins/jqplot.categoryAxisRenderer.min.js"></script>
|
||||
<script type="text/javascript" src="third-party/jqplot/plugins/jqplot.canvasTextRenderer.min.js"></script>
|
||||
<script type="text/javascript" src="third-party/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js"></script>
|
||||
<script type="text/javascript" src="third-party/jqplot/plugins/jqplot.pieRenderer.min.js"></script>
|
||||
<script type="text/javascript" src="third-party/jqplot/plugins/jqplot.highlighter.min.js"></script>
|
||||
<script type="text/javascript" src="third-party/jqplot/plugins/jqplot.canvasOverlay.min.js"></script>
|
||||
<!-- D3 Plotting framework -->
|
||||
<script type="text/javascript" src="third-party/d3/d3.js"></script>
|
||||
|
||||
<!-- NVD3 framework -->
|
||||
<script type="text/javascript" src="third-party/nv.d3/nv.d3.js"></script>
|
||||
|
||||
<!-- Custom Javascript library for entries -->
|
||||
<script type="text/javascript" src="js/months.js"></script>
|
||||
|
@ -14,26 +14,12 @@
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Entry object
|
||||
function entry(){
|
||||
this.id=ko.observable();
|
||||
this.pointed=ko.observable();
|
||||
this.operation_date=ko.observable();
|
||||
this.label=ko.observable();
|
||||
this.value=ko.observable();
|
||||
this.account_id=ko.observable();
|
||||
this.sold=ko.observable();
|
||||
this.pointedsold=ko.observable();
|
||||
this.category=ko.observable();
|
||||
}
|
||||
|
||||
// Util function to show a message in message placeholder.
|
||||
function message(alertType, title, message) {
|
||||
$(".alert").alert('close');
|
||||
$("#message-placeholder").append('<div class="alert alert-' + alertType + '"><button type="button" class="close" data-dismiss="alert">×</button><h4>' + title + '</h4>' + message + '</div>');
|
||||
}
|
||||
|
||||
// The ListViewModel used to instanciate viewmodel.
|
||||
var EntryController = function($scope, $http, $rootScope, $filter) {
|
||||
// Entry store and selection
|
||||
$scope.entries = [];
|
||||
@ -279,8 +265,6 @@ var EntryController = function($scope, $http, $rootScope, $filter) {
|
||||
// Removes an entry.
|
||||
$scope.removeEntry = function(entry, modalScope) {
|
||||
// Cancel current editing.
|
||||
//$scope.cancelEditEntry(entry);
|
||||
|
||||
if (!$scope.isNew(entry)) {
|
||||
$http.delete("api/entries/" + entry.id).success(function (result) {
|
||||
message("success", "Delete", result);
|
||||
@ -307,13 +291,13 @@ var EntryController = function($scope, $http, $rootScope, $filter) {
|
||||
// Function to draw the sold evolution chart.
|
||||
$scope.drawChart = function(data, elementId) {
|
||||
// Clear previous chart
|
||||
var element = angular.element(elementId);
|
||||
element.html("");
|
||||
element.css("height", "0px");
|
||||
//var element = angular.element(elementId);
|
||||
//element.html("");
|
||||
//element.css("height", "0px");
|
||||
|
||||
var entries = data.entries;
|
||||
|
||||
if(entries && entries.length > 1) {
|
||||
//if(entries && entries.length > 1) {
|
||||
// Prepare for today vertical line.
|
||||
var today = new Date();
|
||||
today.setHours(0);
|
||||
@ -323,133 +307,51 @@ var EntryController = function($scope, $http, $rootScope, $filter) {
|
||||
var day = 24 * 60 * 60 * 1000;
|
||||
var firstDate = $filter('date')(new Date(Date.parse(entries[0][0]).valueOf() - day), 'yyyy-MM-dd');
|
||||
var lastDate = $filter('date')(new Date(Date.parse(entries[entries.length -1][0]).valueOf() + day), 'yyyy-MM-dd');
|
||||
//var firstDate = new Date(Date.parse(entries[0][0]).valueOf() - day);
|
||||
//var lastDate = new Date(Date.parse(entries[entries.length -1][0]).valueOf() + day);
|
||||
|
||||
// Plot chart, and store it in a window parameter for resize callback (need to be done better than it...)
|
||||
window.chart = $.jqplot(element.prop("id"), [entries], {
|
||||
// Title of the chart
|
||||
title: "Évolution du solde",
|
||||
axes:{
|
||||
// Parameters for the date axis
|
||||
xaxis:{
|
||||
autoscale: true,
|
||||
|
||||
// Date rendere for this axis
|
||||
renderer:$.jqplot.DateAxisRenderer,
|
||||
|
||||
// Limits
|
||||
min: firstDate,
|
||||
max: lastDate,
|
||||
|
||||
// Tick options
|
||||
tickOptions: {
|
||||
// Format date for x axis.
|
||||
formatString: "%F"
|
||||
}
|
||||
},
|
||||
// Parameters for the value axis
|
||||
yaxis: {
|
||||
autoscale: true,
|
||||
}
|
||||
},
|
||||
|
||||
// Highlighter parameters
|
||||
highlighter: {
|
||||
show: true,
|
||||
//yvalues: 4,
|
||||
formatString: '<table class="jqplot-highlighter"><tr><td>date:</td><td>%s</td></tr><tr><td>sold:</td><td>%s</td></tr>'
|
||||
},
|
||||
|
||||
// Series parameters
|
||||
series: [{
|
||||
// We use the OHLC (open, high, low, close) rendered.
|
||||
//renderer:$.jqplot.OHLCRenderer,
|
||||
color: "blue",
|
||||
rendererOptions: {
|
||||
smooth: true,
|
||||
}
|
||||
}],
|
||||
|
||||
// To display horizontal (0) and vertical (today) lines
|
||||
canvasOverlay: {
|
||||
show: true,
|
||||
objects: [
|
||||
// Orange horizontal line for 0 limit
|
||||
{dashedHorizontalLine: {
|
||||
name: "zero",
|
||||
y: 0,
|
||||
lineWidth: 1,
|
||||
color: "orange",
|
||||
shadow: false
|
||||
}},
|
||||
// Red horizontal line for authorized overdraft limit
|
||||
{dashedHorizontalLine: {
|
||||
name: "overdraft",
|
||||
y: data.account.authorized_overdraft,
|
||||
lineWidth: 1,
|
||||
color: "red",
|
||||
shadow: false
|
||||
}},
|
||||
// Gray vertical line for today
|
||||
{ dashedVerticalLine: {
|
||||
name: "today",
|
||||
x: today,
|
||||
lineWidth: 1,
|
||||
color: "gray",
|
||||
shadow: false
|
||||
}}
|
||||
]
|
||||
}
|
||||
var chart = nv.models.lineChart()
|
||||
.x(function(d) { return d3.time.format("%Y-%m-%d").parse(d[0]); })
|
||||
.y(function(d) { return new Number(d[1]); });
|
||||
|
||||
chart.lines.interpolate("monotone");
|
||||
|
||||
chart.xAxis.axisLabel("Date").tickFormat(function(d) {
|
||||
return d3.time.format("%Y-%m-%d")(new Date(d));
|
||||
});
|
||||
} else {
|
||||
// Reset chart to null to avoid redraw of a non existing chart in resize callback.
|
||||
window.chart = null;
|
||||
}
|
||||
chart.xAxis.scale().range([firstDate, lastDate]);
|
||||
|
||||
chart.yAxis.axisLabel("Solde").tickFormat(d3.format('.02f'));
|
||||
|
||||
// FIXME add vertical line for today
|
||||
graph = d3.select(elementId + " svg").datum([
|
||||
{ color: "orange", key: "Zero", values:[
|
||||
[firstDate, "0"],
|
||||
[lastDate, "0"]
|
||||
]},
|
||||
{ color: "red", key: "Authorized overdraft", values : [
|
||||
[firstDate, new Number($scope.account.authorized_overdraft)],
|
||||
[lastDate, new Number($scope.account.authorized_overdraft)]
|
||||
]},
|
||||
{ color: "darkblue", key: "Sold evolution", values: entries},
|
||||
]).transition().duration(1200).call(chart);
|
||||
|
||||
nv.utils.windowResize(chart.update);
|
||||
};
|
||||
|
||||
|
||||
// Function to draw the expense category pie chart.
|
||||
$scope.drawPieChart = function(entries, elementId) {
|
||||
// Clear previous chart
|
||||
var element = angular.element(elementId);
|
||||
element.html("");
|
||||
element.css("height", "0px");
|
||||
|
||||
if(entries && entries.length > 1) {
|
||||
// Plot chart, and store it in a window parameter for resize callback (need to be done better than it...)
|
||||
window.pieChart = $.jqplot(element.attr("id"), [entries], {
|
||||
// Title of the chart
|
||||
title: "Dépenses",
|
||||
|
||||
// Series parameters.
|
||||
seriesDefaults: {
|
||||
// Pie chart renderer
|
||||
renderer: $.jqplot.PieRenderer,
|
||||
rendererOptions: {
|
||||
showDataLabels: true,
|
||||
}
|
||||
},
|
||||
|
||||
// Legend parameters.
|
||||
legend: {
|
||||
show: true,
|
||||
location: 'e',
|
||||
rendererOptions: {
|
||||
numberRows: 9,
|
||||
numberColumns: 2
|
||||
}
|
||||
},
|
||||
|
||||
// Highlighter parameters;
|
||||
highlighter: {
|
||||
show: true,
|
||||
formatString:'%s: %s',
|
||||
tooltipLocation:'sw',
|
||||
useAxesFormatters:false
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Reset chart to null to avoid redraw of a non existing chart in resize callback.
|
||||
window.pieChart = null;
|
||||
}
|
||||
//if(entries && entries.length > 1) {
|
||||
var chart = nv.models.pieChart()
|
||||
.x(function(d) { return d[0]; })
|
||||
.y(function(d) { return d[1]; })
|
||||
.showLabels(true);
|
||||
|
||||
d3.select(elementId + " svg").datum([{key: "Expenses", values: entries}]).transition().duration(1200).call(chart);
|
||||
|
||||
nv.utils.windowResize(chart.update);
|
||||
//}
|
||||
};
|
||||
|
||||
$rootScope.$on("monthsLoadedEvent", function(event, args){
|
||||
|
7790
src/html/third-party/d3/d3.js
vendored
Normal file
7790
src/html/third-party/d3/d3.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
src/html/third-party/d3/d3.min.js
vendored
Normal file
4
src/html/third-party/d3/d3.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
656
src/html/third-party/nv.d3/nv.d3.css
vendored
Normal file
656
src/html/third-party/nv.d3/nv.d3.css
vendored
Normal file
@ -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: bold;
|
||||
}
|
||||
|
||||
|
||||
/**********
|
||||
* 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;
|
||||
*/
|
||||
}
|
||||
|
||||
|
11307
src/html/third-party/nv.d3/nv.d3.js
vendored
Normal file
11307
src/html/third-party/nv.d3/nv.d3.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5
src/html/third-party/nv.d3/nv.d3.min.js
vendored
Normal file
5
src/html/third-party/nv.d3/nv.d3.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user