Commit 118df906 authored by Romain Loth's avatar Romain Loth

new d3 version

parent 96c369b8
.dc-chart {
div.dc-chart {
float: left;
}
.dc-chart rect.bar {
stroke: none;
fill: steelblue;
cursor: pointer;
}
.dc-chart rect.bar:hover {
......@@ -26,29 +26,24 @@
fill: #ccc;
}
.dc-chart .sub .bar {
stroke: none;
fill: #ccc;
}
.dc-chart .pie-slice {
fill: white;
font-size: 12px;
cursor: pointer;
}
.dc-chart .pie-slice :hover{
.dc-chart .pie-slice :hover {
fill-opacity: .8;
}
.dc-chart .selected path{
.dc-chart .selected path {
stroke-width: 3;
stroke: #ccc;
fill-opacity: 1;
}
.dc-chart .deselected path{
strok: none;
.dc-chart .deselected path {
stroke: none;
fill-opacity: .5;
fill: #ccc;
}
......@@ -63,6 +58,13 @@
font: 10px sans-serif;
}
.dc-chart .grid-line {
fill: none;
stroke: #ccc;
opacity: .5;
shape-rendering: crispEdges;
}
.dc-chart .grid-line line {
fill: none;
stroke: #ccc;
......@@ -86,56 +88,30 @@
.dc-chart path.line {
fill: none;
stroke: steelblue;
stroke-width: 1.5px;
}
.dc-chart circle.dot{
fill: steelblue;
}
.dc-chart g.stack1 path.line {
stroke: green;
}
.dc-chart g.stack1 circle.dot{
fill: green;
}
.dc-chart g.stack2 path.line {
stroke: red;
}
.dc-chart g.stack2 circle.dot{
fill: red;
.dc-chart circle.dot {
stroke: none;
}
.dc-chart g.dc-tooltip path{
.dc-chart g.dc-tooltip path {
fill: none;
stroke: grey;
stroke-opacity: .8;
}
.dc-chart path.area {
fill: steelblue;
fill-opacity: .3;
stroke: none;
}
.dc-chart g.stack1 path.area {
fill: green;
}
.dc-chart g.stack2 path.area {
fill: red;
}
.dc-chart .node {
font-size: 0.7em;
cursor: pointer;
}
.dc-chart .node :hover{
.dc-chart .node :hover {
fill-opacity: .8;
}
......@@ -146,7 +122,7 @@
}
.dc-chart .deselected circle {
strok: none;
stroke: none;
fill-opacity: .5;
fill: #ccc;
}
......@@ -172,13 +148,14 @@
font-weight: bold;
}
.dc-data-table {}
.dc-data-table {
}
.dc-chart g.state{
.dc-chart g.state {
cursor: pointer;
}
.dc-chart g.state :hover{
.dc-chart g.state :hover {
fill-opacity: .8;
}
......@@ -205,7 +182,7 @@
fill: none;
}
.dc-chart g.debug rect{
.dc-chart g.debug rect {
fill: blue;
fill-opacity: .2;
}
......@@ -222,4 +199,48 @@
.dc-chart g.row text {
fill: white;
font-size: 12px;
cursor: pointer;
}
.dc-legend {
font-size: 11px;
}
.dc-legend-item {
cursor: pointer;
}
.dc-chart g.axis text {
/* Makes it so the user can't accidentally click and select text that is meant as a label only */
-webkit-user-select: none; /* Chrome/Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10 */
-o-user-select: none;
user-select: none;
pointer-events: none;
}
.dc-chart path.highlight {
stroke-width: 3;
fill-opacity: 1;
stroke-opacity: 1;
}
.dc-chart .highlight {
fill-opacity: 1;
stroke-opacity: 1;
}
.dc-chart .fadeout {
fill-opacity: 0.2;
stroke-opacity: 0.2;
}
.dc-chart path.dc-symbol {
fill-opacity: 0.5;
stroke-opacity: 0.5;
}
.dc-hard .number-display {
float: none;
}
This diff is collapsed.
This diff is collapsed.
dc.new.js
\ No newline at end of file
......@@ -278,13 +278,9 @@ function Main_test(Data) {
var div_table = '<p align="right">'+"\n"
div_table += '<table id="my-ajax-table" class="table table-bordered">'+"\n"
div_table += "\t"+'<thead>'+"\n"
div_table += "\t"+"\t"+'<th width="100px;" data-dynatable-column="date">'+"\n"
div_table += "\t"+"\t"+'<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span> Date</th>'+"\n"
div_table += "\t"+"\t"+'<th data-dynatable-column="name">'+"\n"
div_table += "\t"+"\t"+'<span class="glyphicon glyphicon-text-size" aria-hidden="true"></span> Title</th>'+"\n"
div_table += "\t"+"\t"+'<th data-dynatable-column="del" data-dynatable-no-sort="true">'+"\n"
div_table += "\t"+"\t"+'<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>'+"\n"
div_table += "\t"+"\t"+'</th>'+"\n"
div_table += "\t"+"\t"+'<th width="100px;" data-dynatable-column="date">Date</th>'+"\n"
div_table += "\t"+"\t"+'<th data-dynatable-column="name">Title</th>'+"\n"
div_table += "\t"+"\t"+'<th data-dynatable-column="del" data-dynatable-no-sort="true">Trash</th>'+"\n"
div_table += "\t"+"\t"+'</th>'+"\n"
div_table += "\t"+'</thead>'+"\n"
div_table += "\t"+'<tbody>'+"\n"
......@@ -395,9 +391,9 @@ function Main_test(Data) {
return d.value;
})
.title(function (d) {
var value = d.value.avg ? d.value.avg : d.value;
var value = d.data.value.avg ? d.data.value.avg : d.data.value;
if (isNaN(value)) value = 0;
return dateFormat(d.key) + "\n" + numberFormat(value);
return dateFormat(d.data.key) + "\n" + numberFormat(value);
})
])
.xAxis();
......
......@@ -407,7 +407,7 @@ function Main_test( data , initial) {
// .renderDataPoints({radius: 2, fillOpacity: 0.8, strokeOpacity: 0.8})
.brushOn(false)
.title(function (d) {
var value = d.value.avg ? d.value.avg : d.value;
var value = d.data.value.avg ? d.data.value.avg : d.data.value;
if (isNaN(value)) value = 0;
return value+" journals with "+Number(d.key)+" publications";
})
......
......@@ -1645,7 +1645,7 @@ function MainTableAndCharts( data , initial , search_filter) {
// .renderDataPoints({radius: 2, fillOpacity: 0.8, strokeOpacity: 0.8})
.brushOn(false)
.title(function (d) {
var value = d.value.avg ? d.value.avg : d.value;
var value = d.data.value.avg ? d.data.value.avg : d.data.value;
if (isNaN(value)) value = 0;
return value+" ngrams with "+FirstScore+"="+Number(d.key);
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment