MCPcopy Create free account
hub / github.com/chartjs/Chart.js / getTicks

Function getTicks

test/specs/scale.linear.tests.js:726–740  ·  view source on GitHub ↗
(grace)

Source from the content-addressed store, hash-verified

724
725 it('should generate the same ticks for explicit bounds with and without grace', function() {
726 function getTicks(grace) {
727 var chart = window.acquireChart({
728 type: 'line',
729 data: {
730 labels: ['a', 'b'],
731 datasets: [{data: [10, 90]}]
732 },
733 options: {
734 scales: {
735 y: {min: 0, max: 100, grace}
736 }
737 }
738 });
739 return chart.scales.y.ticks.map(tick => tick.value);
740 }
741
742 expect(getTicks('10%')).toEqual(getTicks(undefined));
743 expect(getTicks(20)).toEqual(getTicks(undefined));

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected