Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(subchart): fix subchart esm import failure
Move .unbindZoomEvent() from zoom.ts --> interaction.ts Fix #2255
- Loading branch information
Showing
3 changed files
with
48 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Copyright (c) 2017 ~ present NAVER Corp. | ||
* billboard.js project is licensed under the MIT license | ||
*/ | ||
/* eslint-disable */ | ||
/* global describe, beforeEach, it, expect */ | ||
import {expect} from "chai"; | ||
import bb, {line, subchart} from "../../src/index.esm"; | ||
|
||
describe("ESM subchart", function() { | ||
let chart; | ||
|
||
const args: any = { | ||
data: { | ||
columns: [ | ||
["data1", 30, 350, 300, 0, 100], | ||
["data2", 200, 100, 140, 200, 150] | ||
], | ||
type: line() | ||
}, | ||
subchart: { | ||
enabled: subchart() | ||
} | ||
}; | ||
|
||
beforeEach(() => { | ||
chart = bb.generate(args); | ||
}); | ||
|
||
it("shouldn't throw error during zoom", () => { | ||
expect(chart.subchart.show()).to.not.throw; | ||
}); | ||
}); |