@@ -18702,6 +18702,45 @@ exports.default = function (lib) {
18702
18702
}, delay);
18703
18703
});
18704
18704
18705
+ // FIX for c3 tooltip bug - REMOVE when https://github.com/c3js/c3/pull/2476 is merged
18706
+ if (_c2.default.chart && _c2.default.chart.internal && _c2.default.chart.internal.fn) {
18707
+ _c2.default.chart.internal.fn.horizontalDistance = function (data, pos) {
18708
+ var $$ = this,
18709
+ config = $$.config,
18710
+ xIndex = config.axis_rotated ? 1 : 0,
18711
+ x = $$.x(data.x);
18712
+ return Math.abs(x - pos[xIndex]);
18713
+ };
18714
+ _c2.default.chart.internal.fn.findClosest = function (values, pos) {
18715
+ var CLASS = _c2.default.chart.internal.fn.CLASS;
18716
+ var $$ = this,
18717
+ minDist = $$.config.point_sensitivity,
18718
+ minDist = Infinity,
18719
+ closest;
18720
+ // find mouseovering bar
18721
+ values.filter(function (v) {
18722
+ return v && $$.isBarType(v.id);
18723
+ }).forEach(function (v) {
18724
+ var shape = $$.main.select('.' + CLASS.bars + $$.getTargetSelectorSuffix(v.id) + ' .' + CLASS.bar + '-' + v.index).node();
18725
+ if (!closest && $$.isWithinBar($$.d3.mouse(shape), shape)) {
18726
+ closest = v;
18727
+ }
18728
+ });
18729
+ // find closest point from non-bar
18730
+ values.filter(function (v) {
18731
+ return v && !$$.isBarType(v.id);
18732
+ }).forEach(function (v) {
18733
+ var d = $$.dist(v, pos);
18734
+ var d = $$.horizontalDistance(v, pos);
18735
+ if (d < minDist) {
18736
+ minDist = d;
18737
+ closest = v;
18738
+ }
18739
+ });
18740
+ return closest;
18741
+ };
18742
+ }
18743
+
18705
18744
return defineC3();
18706
18745
};
18707
18746
@@ -18954,6 +18993,7 @@ function defineC3() {
18954
18993
18955
18994
// Render artifacts
18956
18995
this.view._artifacts['c3'] = _c2.default.generate(c3options);
18996
+
18957
18997
_paginatingLegend2.default.call(this, _extends({}, options, { onLegendRendered: function onLegendRendered() {
18958
18998
var legendElement = _this.el().querySelector('.keen-c3-legend');
18959
18999
if (legendElement) {
@@ -19277,7 +19317,7 @@ function getDefaultType(parser) {
19277
19317
/* 151 */
19278
19318
/***/ (function(module) {
19279
19319
19280
- module.exports = {"name":"keen-dataviz","description":"Data Visualization SDK for Keen IO","license":"MIT","version":"3.0.29","main":"dist/external_d3_c3/node/keen-dataviz.js","browser":"dist/external_d3_c3/keen-dataviz.js","style":"dist/keen-dataviz.css","scripts":{"start":"concurrently --kill-others \"NODE_ENV=development webpack-dev-server\" \"npm run postcss-watch\"","postcss-watch":"node_modules/postcss-cli/bin/postcss lib/style/keen-dataviz-c3.css -o test/demo/keen-dataviz.css --watch --config postcss.config.js","build":"NODE_ENV=production webpack -p && npm run build:css && NODE_ENV=production OPTIMIZE_MINIMIZE=1 webpack -p && npm run build:css && npm run build:css:min && npm run build:external_d3_c3 && npm run build:external_d3_c3:css && npm run build:external_d3_c3:css:min && npm run build:node","build:css":"node_modules/postcss-cli/bin/postcss lib/style/keen-dataviz-c3.css -o dist/keen-dataviz.css --config postcss.config.js","build:css:min":"OPTIMIZE_MINIMIZE=1 node_modules/postcss-cli/bin/postcss lib/style/keen-dataviz-c3.css -o dist/keen-dataviz.min.css --config postcss.config.js","build:external_d3_c3:css":"node_modules/postcss-cli/bin/postcss lib/style/keen-dataviz.css -o dist/external_d3_c3/keen-dataviz.css --config postcss.config.js","build:external_d3_c3:css:min":"OPTIMIZE_MINIMIZE=1 node_modules/postcss-cli/bin/postcss lib/style/keen-dataviz.css -o dist/external_d3_c3/keen-dataviz.min.css --config postcss.config.js","build:external_d3_c3":"NODE_ENV=production EXTERNAL_D3_C3=1 webpack -p && NODE_ENV=production EXTERNAL_D3_C3=1 OPTIMIZE_MINIMIZE=1 webpack -p","build:node":"TARGET=node NODE_ENV=production EXTERNAL_D3_C3=1 webpack -p","profile":"webpack --profile --json > stats.json","analyze":"webpack-bundle-analyzer stats.json /dist","version":"npm run build && git add .","postversion":"git push && git push --tags","test":"NODE_ENV=test jest","test:watch":"NODE_ENV=test jest --watch"},"repository":{"type":"git","url":"https://github.com/keen/keen-dataviz.js.git"},"bugs":"https://github.com/keen/keen-dataviz.js/issues","author":"Keen.IO <
[email protected] > (https://keen.io/)","contributors":["Dustin Larimer <
[email protected] > (https://github.com/dustinlarimer)","Joanne Cheng <
[email protected] > (https://github.com/joannecheng)","Eric Anderson <
[email protected] > (https://github.com/aroc)","Joe Wegner <
[email protected] > (https://github.com/josephwegner)","Sara Falkoff <
[email protected] (https://github.com/sfalkoff)","Adam Kasprowicz <
[email protected] > (https://github.com/adamkasprowicz)"],"homepage":"https://keen.io","keywords":["d3","c3","Analytics","Stats","Statistics","Visualization","Visualizations","Data Visualization","Chart","Charts","Charting","Svg","Dataviz","Plots","Graphs","Funnels"],"dependencies":{"c3":"^0.6.7","d3":"^5.4.0","moment-timezone":"^0.5.21","promise-polyfill":"^8.0.0"},"devDependencies":{"autoprefixer":"^8.2.0","babel-loader":"^7.1.4","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-env":"^1.7.0","concurrently":"^3.5.1","cssnano":"^3.10.0","eslint":"^4.19.1","eslint-config-airbnb":"^16.1.0","eslint-loader":"^2.0.0","eslint-plugin-import":"^2.11.0","eslint-plugin-jsx-a11y":"^6.0.3","eslint-plugin-react":"^7.7.0","html-loader":"^0.5.5","html-webpack-plugin":"^3.2.0","jest":"^22.4.3","jest-environment-jsdom-c3":"^2.0.0","nock":"^9.2.6","postcss":"^6.0.21","postcss-cli":"^5.0.0","postcss-color-function":"^4.0.1","postcss-css-variables":"^0.8.1","postcss-cssnext":"^2.4.0","postcss-import":"^8.0.2","postcss-loader":"^2.1.3","precss":"^3.1.2","regenerator-runtime":"^0.11.1","replace-in-file":"^3.4.0","style-loader":"^0.20.3","webpack":"^4.5.0","webpack-bundle-analyzer":"^2.11.1","webpack-cli":"^2.0.13","webpack-dev-server":"^3.1.1","xhr-mock":"^2.3.2"}};
19320
+ module.exports = {"name":"keen-dataviz","description":"Data Visualization SDK for Keen IO","license":"MIT","version":"3.0.30","main":"dist/external_d3_c3/node/keen-dataviz.js","browser":"dist/external_d3_c3/keen-dataviz.js","style":"dist/keen-dataviz.css","scripts":{"start":"concurrently --kill-others \"NODE_ENV=development webpack-dev-server\" \"npm run postcss-watch\"","postcss-watch":"node_modules/postcss-cli/bin/postcss lib/style/keen-dataviz-c3.css -o test/demo/keen-dataviz.css --watch --config postcss.config.js","build":"NODE_ENV=production webpack -p && npm run build:css && NODE_ENV=production OPTIMIZE_MINIMIZE=1 webpack -p && npm run build:css && npm run build:css:min && npm run build:external_d3_c3 && npm run build:external_d3_c3:css && npm run build:external_d3_c3:css:min && npm run build:node","build:css":"node_modules/postcss-cli/bin/postcss lib/style/keen-dataviz-c3.css -o dist/keen-dataviz.css --config postcss.config.js","build:css:min":"OPTIMIZE_MINIMIZE=1 node_modules/postcss-cli/bin/postcss lib/style/keen-dataviz-c3.css -o dist/keen-dataviz.min.css --config postcss.config.js","build:external_d3_c3:css":"node_modules/postcss-cli/bin/postcss lib/style/keen-dataviz.css -o dist/external_d3_c3/keen-dataviz.css --config postcss.config.js","build:external_d3_c3:css:min":"OPTIMIZE_MINIMIZE=1 node_modules/postcss-cli/bin/postcss lib/style/keen-dataviz.css -o dist/external_d3_c3/keen-dataviz.min.css --config postcss.config.js","build:external_d3_c3":"NODE_ENV=production EXTERNAL_D3_C3=1 webpack -p && NODE_ENV=production EXTERNAL_D3_C3=1 OPTIMIZE_MINIMIZE=1 webpack -p","build:node":"TARGET=node NODE_ENV=production EXTERNAL_D3_C3=1 webpack -p","profile":"webpack --profile --json > stats.json","analyze":"webpack-bundle-analyzer stats.json /dist","version":"npm run build && git add .","postversion":"git push && git push --tags","test":"NODE_ENV=test jest","test:watch":"NODE_ENV=test jest --watch"},"repository":{"type":"git","url":"https://github.com/keen/keen-dataviz.js.git"},"bugs":"https://github.com/keen/keen-dataviz.js/issues","author":"Keen.IO <
[email protected] > (https://keen.io/)","contributors":["Dustin Larimer <
[email protected] > (https://github.com/dustinlarimer)","Joanne Cheng <
[email protected] > (https://github.com/joannecheng)","Eric Anderson <
[email protected] > (https://github.com/aroc)","Joe Wegner <
[email protected] > (https://github.com/josephwegner)","Sara Falkoff <
[email protected] (https://github.com/sfalkoff)","Adam Kasprowicz <
[email protected] > (https://github.com/adamkasprowicz)"],"homepage":"https://keen.io","keywords":["d3","c3","Analytics","Stats","Statistics","Visualization","Visualizations","Data Visualization","Chart","Charts","Charting","Svg","Dataviz","Plots","Graphs","Funnels"],"dependencies":{"c3":"^0.6.12","d3":"^5.4.0","moment-timezone":"^0.5.21","promise-polyfill":"^8.0.0"},"devDependencies":{"autoprefixer":"^8.2.0","babel-loader":"^7.1.4","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-env":"^1.7.0","concurrently":"^3.5.1","cssnano":"^3.10.0","eslint":"^4.19.1","eslint-config-airbnb":"^16.1.0","eslint-loader":"^2.0.0","eslint-plugin-import":"^2.11.0","eslint-plugin-jsx-a11y":"^6.0.3","eslint-plugin-react":"^7.7.0","html-loader":"^0.5.5","html-webpack-plugin":"^3.2.0","jest":"^22.4.3","jest-environment-jsdom-c3":"^2.0.0","nock":"^9.2.6","postcss":"^6.0.21","postcss-cli":"^5.0.0","postcss-color-function":"^4.0.1","postcss-css-variables":"^0.8.1","postcss-cssnext":"^2.4.0","postcss-import":"^8.0.2","postcss-loader":"^2.1.3","precss":"^3.1.2","regenerator-runtime":"^0.11.1","replace-in-file":"^3.4.0","style-loader":"^0.20.3","webpack":"^4.5.0","webpack-bundle-analyzer":"^2.11.1","webpack-cli":"^2.0.13","webpack-dev-server":"^3.1.1","xhr-mock":"^2.3.2"}};
19281
19321
19282
19322
/***/ }),
19283
19323
/* 152 */
@@ -20732,7 +20772,7 @@ function buildDomWrapper(el, options) {
20732
20772
if (options.title && options.showTitle) {
20733
20773
html += '<div class="keen-dataviz-title ' + options.theme + '-title">' + options.title + '</div>';
20734
20774
}
20735
- html += '<div class="' + options.theme + '-rendering ' + options.theme + '-rendering-' + align + '">' + container + '</div>';
20775
+ html += '<div class="keen-dataviz-rendering keen-dataviz-rendering-' + align + ' ' + options.theme + '-rendering ' + options.theme + '-rendering-' + align + '">' + container + '</div>';
20736
20776
if (options.notes) {
20737
20777
html += '<div class="keen-dataviz-notes ' + options.theme + '-notes">' + options.notes + '</div>';
20738
20778
}
0 commit comments