Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/Stats/StatsChart.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ describe('the chart card', () => {
zoomed({}, { xaxis: { min: Number.NaN, max: 2000 } })
expect(wrapper.emitted('zoom')).toEqual([[{ min: 1000, max: 2000 }]])
expect(apex().props('options').chart.zoom).toMatchObject({ enabled: true, type: 'x', autoSelected: 'zoom' })
// the wheel must keep scrolling the page
expect(apex().props('options').chart.zoom.allowMouseWheelZoom).toBe(false)
})

it('applies the zoom window of the page to the x axis', async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Stats/StatsChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default {
...base,
chart: {
...base.chart,
zoom: { enabled: true, type: 'x', autoSelected: 'zoom' },
zoom: { enabled: true, type: 'x', autoSelected: 'zoom', allowMouseWheelZoom: false },
events: {
zoomed: (ctx, config) => {
const min = config?.xaxis?.min
Expand Down
Loading