Files
SkinbaseNova/public/legacy/assets/plugins/charts-rickshaw/tests/Rickshaw.Graph.Renderer.Scatterplot.js
2026-02-07 08:23:18 +01:00

30 lines
580 B
JavaScript

var Rickshaw = require("../rickshaw");
exports["should add the series className to all scatterplot points"] = function(test) {
var el = document.createElement("div");
var graph = new Rickshaw.Graph({
element: el,
stroke: true,
width: 10,
height: 10,
renderer: 'scatterplot',
series: [
{
className: 'fnord',
data: [
{ x: 0, y: 40 },
{ x: 1, y: 49 },
{ x: 2, y: 38 },
{ x: 3, y: 30 },
{ x: 4, y: 32 }
]
}
]
});
graph.render()
var path = graph.vis.selectAll('circle.fnord')
test.equals(5, path.size())
test.done()
}