|
|
@ -3,8 +3,6 @@ import c3 from '../src'; |
|
|
|
window.c3 = c3; |
|
|
|
window.c3 = c3; |
|
|
|
|
|
|
|
|
|
|
|
window.initDom = function () { |
|
|
|
window.initDom = function () { |
|
|
|
'use strict'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var div = document.createElement('div'); |
|
|
|
var div = document.createElement('div'); |
|
|
|
div.id = 'chart'; |
|
|
|
div.id = 'chart'; |
|
|
|
div.style.width = '640px'; |
|
|
|
div.style.width = '640px'; |
|
|
@ -14,8 +12,6 @@ window.initDom = function () { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
window.setMouseEvent = function(chart, name, x, y, element) { |
|
|
|
window.setMouseEvent = function(chart, name, x, y, element) { |
|
|
|
'use strict'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var paddingLeft = chart.internal.main.node().transform.baseVal.getItem(0).matrix.e, |
|
|
|
var paddingLeft = chart.internal.main.node().transform.baseVal.getItem(0).matrix.e, |
|
|
|
event = document.createEvent("MouseEvents"); |
|
|
|
event = document.createEvent("MouseEvents"); |
|
|
|
event.initMouseEvent(name, true, true, window, |
|
|
|
event.initMouseEvent(name, true, true, window, |
|
|
@ -25,8 +21,6 @@ window.setMouseEvent = function(chart, name, x, y, element) { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
window.initChart = function (chart, args, done) { |
|
|
|
window.initChart = function (chart, args, done) { |
|
|
|
'use strict'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (typeof chart === 'undefined') { |
|
|
|
if (typeof chart === 'undefined') { |
|
|
|
window.initDom(); |
|
|
|
window.initDom(); |
|
|
|
} |
|
|
|
} |
|
|
|