loadConfig(input, function(json) {
var chart = utils.acquireChart(json.config, json.options);
if (!inputs.png) {
- fail('Missing PNG comparison file for ' + inputs.json);
+ fail('Missing PNG comparison file for ' + input);
done();
}
--- /dev/null
+// Should generate max and min that are not equal when data contains values that are very close to each other
+
+module.exports = {
+ config: {
+ type: 'scatter',
+ data: {
+ datasets: [{
+ data: [
+ {x: 1, y: 1.8548483304974972},
+ {x: 2, y: 1.8548483304974974},
+ ]
+ }],
+ },
+ },
+ options: {
+ spriteText: true
+ }
+};
}
describe('Linear Scale', function() {
+ describe('auto', jasmine.fixture.specs('scale.linear'));
+
it('Should register the constructor with the scale service', function() {
var Constructor = Chart.scaleService.getScaleConstructor('linear');
expect(Constructor).not.toBe(undefined);
expect(chart.scales.x.max).toEqual(0);
});
- it('Should generate max and min that are not equal when data contains values that are very close to each other', function() {
- var chart = window.acquireChart({
- type: 'scatter',
- data: {
- datasets: [{
- data: [
- {x: 1, y: 1.8548483304974972},
- {x: 2, y: 1.8548483304974974},
- ]
- }],
- },
- options: {
- scales: {
- y: {
- type: 'linear',
- }
- }
- }
- });
-
- expect(chart.scales.y).not.toEqual(undefined); // must construct
- expect(chart.scales.y.max).toBeGreaterThan(chart.scales.y.min);
- });
-
it('Should get correct pixel values when horizontal', function() {
var chart = window.acquireChart({
type: 'horizontalBar',