Merge branch 'development' of https://github.com/novus/nvd3 into development

Conflicts:
	nv.d3.min.js
master
Tyler Wolf 11 years ago
commit c0db335539

@ -1,4 +1,3 @@
nv.models.scatterChart = function() {
var margin = {top: 30, right: 20, bottom: 50, left: 60},
width = null,

@ -12,7 +12,7 @@ text {
}
</style>
<body class='with-transitions'>
<body class='with-3d-shadow with-transitions'>
<svg id="test1"></svg>

@ -34,7 +34,7 @@ svg {
margin-left: 100px;
}
</style>
<body>
<body class='with-3d-shadow with-transitions'>
<div id="chart1" >
<svg style="height: 500px;"></svg>

@ -28,7 +28,7 @@ text {
</style>
<body>
<div id="chart1" class='with-transitions'>
<div id="chart1" class='with-3d-shadow with-transitions'>
<svg> </svg>
</div>

@ -28,7 +28,7 @@ text {
</style>
<body>
<div id="chart1">
<div id="chart1" class='with-3d-shadow with-transitions'>
<svg> </svg>
</div>

@ -32,7 +32,7 @@ svg {
</style>
<body>
<div id="chart1">
<div id="chart1" class='with-3d-shadow with-transitions'>
<svg style="height: 500px;"></svg>
</div>

@ -32,7 +32,7 @@ svg {
</style>
<body>
<div id="chart">
<div id="chart" class='with-3d-shadow with-transitions'>
<svg style="height: 500px;"></svg>
</div>

@ -28,7 +28,7 @@ text {
</style>
<body>
<div id="chart1">
<div id="chart1" class='with-3d-shadow with-transitions'>
<svg></svg>
</div>

@ -31,7 +31,7 @@ text {
</style>
<body>
<div id="chart1">
<div id="chart1" class='with-3d-shadow with-transitions'>
<svg></svg>
</div>

@ -27,9 +27,9 @@ text {
}
</style>
<body>
<body class='with-3d-shadow with-transitions'>
<div id="chart1">
<div id="chart1" >
<svg> </svg>
</div>

@ -16,7 +16,7 @@ text {
border: 2px;
}
</style>
<body>
<body class='with-3d-shadow with-transitions'>
<h2>Test1</h2>
<svg id="test1" class="mypiechart"></svg>

@ -41,7 +41,7 @@ div {
<body>
<div id="offsetDiv">
<div id="test1" class="with-transitions chartWrap">
<div id="test1" class='with-3d-shadow with-transitions'>
<svg></svg>
</div>
</div>

@ -38,7 +38,7 @@ div {
</style>
<body>
<body class='with-3d-shadow with-transitions'>
<div id="offsetDiv">
<div id="test1" class="chartWrap">

@ -15,7 +15,7 @@ h2, p {
}
</style>
<body>
<body class='with-3d-shadow with-transitions'>
<h2>SparklinePlus:</h2>
<p><svg id="chart1" class="sparkline"></svg></p>

@ -18,7 +18,7 @@ text {
}
</style>
<body>
<body class='with-3d-shadow with-transitions'>
<div>
<svg id="chart1"></svg>

@ -3,7 +3,7 @@
var nv = window.nv || {};
nv.version = '1.1.5b';
nv.version = '1.1.7b';
nv.dev = true //set false when in production
window.nv = nv;
@ -609,7 +609,7 @@ window.nv.tooltip.* also has various helper methods.
//Create new tooltip div if it doesn't exist on DOM.
var container = document.createElement('div');
container.className = 'nvtooltip with-3d-shadow ' + (classes ? classes : 'xy-tooltip');
container.className = 'nvtooltip ' + (classes ? classes : 'xy-tooltip');
var body = parentContainer;
if ( !parentContainer || parentContainer.tagName.match(/g|svg/i)) {
@ -10911,11 +10911,11 @@ nv.models.scatter = function() {
// *Injecting series and point index for reference
/* *Adding a 'jitter' to the points, because there's an issue in d3.geom.voronoi.
*/
var pX = getX(point,pointIndex) + Math.random() * 1e-7;
var pY = getY(point,pointIndex) + Math.random() * 1e-7;
var pX = getX(point,pointIndex);
var pY = getY(point,pointIndex);
return [x(pX),
y(pY),
return [x(pX)+ Math.random() * 1e-7,
y(pY)+ Math.random() * 1e-7,
groupIndex,
pointIndex, point]; //temp hack to add noise untill I think of a better way so there are no duplicates
})
@ -11430,7 +11430,6 @@ nv.models.scatter = function() {
return chart;
}
nv.models.scatterChart = function() {
"use strict";
//============================================================

4
nv.d3.min.js vendored

File diff suppressed because one or more lines are too long

@ -2,7 +2,7 @@
var nv = window.nv || {};
nv.version = '1.1.5b';
nv.version = '1.1.7b';
nv.dev = true //set false when in production
window.nv = nv;

@ -167,11 +167,11 @@ nv.models.scatter = function() {
// *Injecting series and point index for reference
/* *Adding a 'jitter' to the points, because there's an issue in d3.geom.voronoi.
*/
var pX = getX(point,pointIndex) + Math.random() * 1e-7;
var pY = getY(point,pointIndex) + Math.random() * 1e-7;
var pX = getX(point,pointIndex);
var pY = getY(point,pointIndex);
return [x(pX),
y(pY),
return [x(pX)+ Math.random() * 1e-7,
y(pY)+ Math.random() * 1e-7,
groupIndex,
pointIndex, point]; //temp hack to add noise untill I think of a better way so there are no duplicates
})

@ -1,4 +1,3 @@
nv.models.scatterChart = function() {
"use strict";
//============================================================

@ -13,7 +13,7 @@
/********************
Box shadow and border radius styling
*/
.with-3d-shadow {
.nvtooltip.with-3d-shadow, .with-3d-shadow .nvtooltip {
-moz-box-shadow: 0 5px 10px rgba(0,0,0,.2);
-webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2);
box-shadow: 0 5px 10px rgba(0,0,0,.2);

@ -272,7 +272,7 @@ window.nv.tooltip.* also has various helper methods.
//Create new tooltip div if it doesn't exist on DOM.
var container = document.createElement('div');
container.className = 'nvtooltip with-3d-shadow ' + (classes ? classes : 'xy-tooltip');
container.className = 'nvtooltip ' + (classes ? classes : 'xy-tooltip');
var body = parentContainer;
if ( !parentContainer || parentContainer.tagName.match(/g|svg/i)) {

@ -75,7 +75,10 @@
Scatter chart: duplicate x values
<svg></svg>
</div>
<div id="test16" class="chart third">
Scatter chart: extremely small data points (1e-10)
<svg></svg>
</div>
</div>
@ -131,6 +134,8 @@ defaultChartTest("test15",[
}
]);
defaultChartTest("test16",tinyPoints());
function defaultChartTest(container, data, margin) {
nv.addGraph(function() {
var chart;
@ -219,4 +224,16 @@ function randomDataSloped(slope,intercept) { //# groups,# points per group
return data;
}
function tinyPoints() {
var rval = {key: "Tiny points", values: []};
for(var i =1; i < 20; i++) {
rval.values.push({
x: Math.random() * 1e-10,
y: Math.random() * 1e-10
});
}
return [rval];
}
</script>

@ -100,6 +100,10 @@
What if there are null, Infinity and NaN values in points?
<svg></svg>
</div>
<div class='chart third' id='chart17'>
Chart with very small, 1e-10, points (old tooltips)
<svg></svg>
</div>
</div>
<script src="../lib/d3.v3.js"></script>
@ -162,6 +166,7 @@ defaultChartConfig("chart13",hyperbole(), true, false, {width: 700, height: 400}
defaultChartConfig("chart14",hyperbole(), false, false, {width: 700, height: 400});
defaultChartConfig("chart15", withNaNs());
defaultChartConfig("chart16", duplicateY(), false);
defaultChartConfig("chart17", tinyPoints(), false);
function defaultChartConfig(containerid, data, guideline, useDates, auxOptions) {
if (auxOptions === undefined) auxOptions = {};
@ -400,4 +405,15 @@ function withNaNs() {
}
]
}
function tinyPoints() {
var rval = {key: "Tiny points", values: []};
for(var i =1; i < 20; i++) {
rval.values.push({
x: i,
y: Math.random() * 1e-10
});
}
return [rval];
}
</script>

Loading…
Cancel
Save