Skip to content

Commit

Permalink
Merge branch 'master' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
netil committed Sep 4, 2023
2 parents 3a1bbd7 + f4ac3f1 commit 11a65cd
Show file tree
Hide file tree
Showing 110 changed files with 6,650 additions and 2,781 deletions.
31 changes: 24 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# [3.9.0-next.2](https://github.com/naver/billboard.js/compare/3.9.0-next.1...3.9.0-next.2) (2023-06-21)
## [3.9.3](https://github.com/naver/billboard.js/compare/3.9.2...3.9.3) (2023-08-09)


### Features
### Bug Fixes

* **bar:** Intent to ship bar.front ([f7e0d80](https://github.com/naver/billboard.js/commit/f7e0d8023cef4bab0f0895077f819d051738a861)), closes [#2965](https://github.com/naver/billboard.js/issues/2965)
* **point:** Enhance point.sensitivity ([a537201](https://github.com/naver/billboard.js/commit/a5372013ab3f7d8af49ab82e7c161dbebc34ae97)), closes [#2568](https://github.com/naver/billboard.js/issues/2568)
* **arc:** Fix shape rendering when data id equivalent of color string ([047d1db](https://github.com/naver/billboard.js/commit/047d1db68bd75efd8402a7a83aa7a04405745880)), closes [#3321](https://github.com/naver/billboard.js/issues/3321)

## [3.9.2](https://github.com/naver/billboard.js/compare/3.9.1...3.9.2) (2023-08-04)


### Bug Fixes

# [3.9.0-next.1](https://github.com/naver/billboard.js/compare/3.8.2...3.9.0-next.1) (2023-06-15)
* **line:** Fix step line path rendering on Windows ([b2633b2](https://github.com/naver/billboard.js/commit/b2633b2d5fa5b722da66edfcde3aece4771a7300)), closes [#3295](https://github.com/naver/billboard.js/issues/3295)
* **load:** Enhance tooltip update on dynamic load ([1df1bd9](https://github.com/naver/billboard.js/commit/1df1bd94f0eb6a256864a7097663ed76a7f48627)), closes [#3305](https://github.com/naver/billboard.js/issues/3305)

## [3.9.1](https://github.com/naver/billboard.js/compare/3.9.0...3.9.1) (2023-07-17)


### Bug Fixes

* **point:** Fix point sensitivity pointe ([a47e091](https://github.com/naver/billboard.js/commit/a47e0913db94ae21b3e36c3ed06346d8d2e5d977)), closes [#3293](https://github.com/naver/billboard.js/issues/3293)
* **tooltip:** Fix tooltip positioning ([cfec99f](https://github.com/naver/billboard.js/commit/cfec99f715b92abda119b44875591917563e4802)), closes [#3291](https://github.com/naver/billboard.js/issues/3291)

# [3.9.0](https://github.com/naver/billboard.js/compare/3.8.2...3.9.0) (2023-07-03)


### Bug Fixes
Expand All @@ -19,9 +34,11 @@
### Features

* **arc:** Intent to ship arc.needle ([04e90aa](https://github.com/naver/billboard.js/commit/04e90aac2ed7322be42b38f9bcef46722a1ddf43)), closes [#3205](https://github.com/naver/billboard.js/issues/3205)
* **bar:** Intent to ship bar.front ([f7e0d80](https://github.com/naver/billboard.js/commit/f7e0d8023cef4bab0f0895077f819d051738a861)), closes [#2965](https://github.com/naver/billboard.js/issues/2965)
* **data:** Intent to ship data.labels.position function ([59be3ec](https://github.com/naver/billboard.js/commit/59be3ecad45adbf7d044d1c63352ded92221bbe9)), closes [#3237](https://github.com/naver/billboard.js/issues/3237)
* **module:** Support dual CJS/ESM package ([437c007](https://github.com/naver/billboard.js/commit/437c007eabc7c7f82ce35eb7f3a2f6bb44438409)), closes [#2202](https://github.com/naver/billboard.js/issues/2202)
* **plugin:** Intent to ship TableView plugin ([215b611](https://github.com/naver/billboard.js/commit/215b611fe68ea37360e8939e9902d489aa502b75)), closes [#1873](https://github.com/naver/billboard.js/issues/1873)
* **legend:** Intent to ship legend.item.interaction.dblclick ([18f5c4a](https://github.com/naver/billboard.js/commit/18f5c4a19478514a473bce86e65e85dc4005e9f1)), closes [#1404](https://github.com/naver/billboard.js/issues/1404)
* **legend:** Intent to ship legent.item.interaction ([af87d10](https://github.com/naver/billboard.js/commit/af87d10b252c3f573a1d1af5167cc8abb3d6b958)), closes [#1598](https://github.com/naver/billboard.js/issues/1598)
* **point:** Enhance point.sensitivity ([a537201](https://github.com/naver/billboard.js/commit/a5372013ab3f7d8af49ab82e7c161dbebc34ae97)), closes [#2568](https://github.com/naver/billboard.js/issues/2568)
* **theme:** Intent to ship dark theme ([252a28e](https://github.com/naver/billboard.js/commit/252a28e62acea92808217a663c00999e6099e1a4)), closes [#3229](https://github.com/naver/billboard.js/issues/3229)

## [3.8.2](https://github.com/naver/billboard.js/compare/3.8.1...3.8.2) (2023-05-18)
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ If you have any questions, checkout the previous posts or create a new one at:
- [Issue with 'question' label](https://github.com/naver/billboard.js/issues?utf8=%E2%9C%93&q=label%3Aquestion)

## Supported chart types
<img src="https://naver.github.io/billboard.js/img/chart-types.png?v=10" width=800>
<img src="https://naver.github.io/billboard.js/img/chart-types.png?v=11" width=800>

## Download and Installation

Expand Down Expand Up @@ -99,6 +99,10 @@ You can download the compressed files for production
- https://naver.github.io/billboard.js/release/latest/dist/theme/datalab.min.css


#### dark
- https://naver.github.io/billboard.js/release/latest/dist/theme/dark.css
- https://naver.github.io/billboard.js/release/latest/dist/theme/dark.min.css

#### insight
- https://naver.github.io/billboard.js/release/latest/dist/theme/insight.css
- https://naver.github.io/billboard.js/release/latest/dist/theme/insight.min.css
Expand Down Expand Up @@ -281,7 +285,7 @@ THE SOFTWARE.
[badge-download]: https://img.shields.io/npm/dm/billboard.js.svg?style=flat
[badge-jsDelivr]: https://data.jsdelivr.com/v1/package/npm/billboard.js/badge?style=rounded
[badge-ci-status]: https://github.com/naver/billboard.js/workflows/CI/badge.svg
[badge-coverage]: https://coveralls.io/repos/github/naver/billboard.js/badge.svg
[badge-coverage]: https://coveralls.io/repos/github/naver/billboard.js/badge.svg?branch=master&v1
[badge-snyk]: https://snyk.io/test/github/naver/billboard.js/badge.svg?targetFile=package.json
[badge-gzip-size]: https://img.badgesize.io/https://unpkg.com/billboard.js/dist/billboard.min.js?compression=gzip
[badge-latest]: https://img.shields.io/npm/v/billboard.js/latest.svg
Expand All @@ -294,7 +298,7 @@ THE SOFTWARE.
[link-download]: https://npm-stat.com/charts.html?package=billboard.js&from=2017-06-08
[link-jsDelivr]: https://www.jsdelivr.com/package/npm/billboard.js
[link-version]: https://www.npmjs.com/package/billboard.js
[link-coverage]: https://coveralls.io/github/naver/billboard.js
[link-coverage]: https://coveralls.io/github/naver/billboard.js?branch=master
[link-snyk]: https://snyk.io/test/github/naver/billboard.js?targetFile=package.json
[link-gzip-size]: https://unpkg.com/billboard.js/dist/billboard.min.js
[link-semantic-release]: https://github.com/semantic-release/semantic-release
Expand Down
10 changes: 4 additions & 6 deletions babel.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = function(api) {
const presets = [
"@babel/typescript",
[
"@babel/env", {
"@babel/preset-env", {
"targets": {
"browsers": [
"last 2 versions",
Expand All @@ -14,17 +14,15 @@ module.exports = function(api) {
},
"modules": false,
"loose": true,
"useBuiltIns": false
"useBuiltIns": false,
exclude: ["@babel/plugin-transform-block-scoping"]
}
]
];

const plugins = [
["@babel/plugin-transform-runtime"],
[
"@babel/plugin-transform-runtime", {
"useESModules": true
}
], [
"@babel/plugin-proposal-class-properties", {
"loose": true
}
Expand Down
29 changes: 17 additions & 12 deletions config/webpack/plugin.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,18 @@ const config = {
};

module.exports = (common, env) => {
const MODE = env?.MODE;
const mode = env?.MODE;

if (env && MODE === "min") {
config.output.filename = config.output.filename.replace(".js", ".min.js");

config.optimization = {
usedExports: true,
minimize: true,
minimizer: [new TerserPlugin(terserConfig)]
};
} else if (env && MODE === "pkgd") {
if (env && /^pkgd/.test(mode)) {
delete common.externals;

config.output.path = `${distPath}/pkgd`;

for (const key in config.entry) {
config.entry[key] = ["core-js/stable", config.entry[key]];
config.entry[`${key}.pkgd`] = ["core-js/stable", config.entry[key]];
delete config.entry[key];
}
} else {
} else if (!mode) {
config.plugins.push(new CleanWebpackPlugin({
cleanOnceBeforeBuildPatterns: [distPath],
verbose: true,
Expand All @@ -67,6 +60,18 @@ module.exports = (common, env) => {
}));
}

// minify for plugin & plugin pkgd
if (/min$/.test(mode)) {
config.mode = "production";
config.output.filename = config.output.filename.replace(".js", ".min.js");

config.optimization = {
usedExports: true,
minimize: true,
minimizer: [new TerserPlugin(terserConfig)]
};
}

return mergeWithCustomize({
customizeObject: customizeObject({
entry: "replace",
Expand Down
8 changes: 5 additions & 3 deletions demo/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ var billboardDemo = {
.replace(/([A-Z]+)/g, " $1");

// set description
this.$description.innerHTML = demos[type[0]][type[1]].description || "";
let desc = demos[type[0]][type[1]];
this.$description.innerHTML = desc.description || (Array.isArray(desc) && desc[0].description) || "";

this.$codeArea.style.display = "block";

// remove selected class
Expand Down Expand Up @@ -354,7 +356,7 @@ var billboardDemo = {
plugins += "new bb.plugin."+ key +"({ // for ESM specify as: new "+ key +"()";
plugins += JSON.stringify(p[key], function(k, v) {
return typeof v === "function" ? v.toString() : v;
}, 5).replace(/\\n/g, "\n").replace(/}$/, " }").replace(/{/, "");
}, 5).replace(/\\n/g, "\n").replace(/}$/g, " }").replace(/{/g, "");
plugins += "),";
})
});
Expand All @@ -377,7 +379,7 @@ var billboardDemo = {
.replace(/(\"|\d),/g, "$1, ");

return k === "json" ?
str.replace(/{/, "{\r\n\t").replace(/}/, "\r\n }") : str;
str.replace(/{/g, "{\r\n\t").replace(/}/g, "\r\n }") : str;
} else if (k === "_plugins") {
return [self.getPluginsCodeStr(v)];
}
Expand Down
115 changes: 115 additions & 0 deletions demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3194,6 +3194,66 @@ d3.select(".chart_area")
}
}
},
LegendItemInteraction: [
{
description: "<b>Single click + AltKey(Win)/optionKey(Mac)</b><br>or <b>Double click</b> legend item to show/hide data series",
options: {
title: {
text: "Single click"
},
data: {
columns: [
["data1", 300, 350, 300],
["data2", 130, 100, 140],
["data3", 230, 200, 240]
],
type: "line"
}
}
},
{
options: {
title: {
text: "Double click"
},
data: {
columns: [
["data1", 300, 350, 300],
["data2", 130, 100, 140],
["data3", 230, 200, 240]
],
type: "line"
},
legend: {
item: {
interaction: {
dblclick: true
}
}
}
}
},
{
options: {
title: {
text: "Interaction=false"
},
data: {
columns: [
["data1", 300, 350, 300],
["data2", 130, 100, 140],
["data3", 230, 200, 240]
],
type: "line"
},
legend: {
item: {
interaction: false
}
}
}
},
],
LegendItemTileType: [
{
options: {
Expand Down Expand Up @@ -3933,6 +3993,61 @@ d3.select(".chart_area")
]
}
},
RegionLabel: {
options: {
data: {
columns: [
["data1", 30, 200, 100, 400, 150, 250],
["data2", 100, 150, 130, 200, 220, 190],
],
axes: {
data2: "y2",
},
type: "line",
colors: {
data1: "#ff0000"
}
},
axis: {
y2: {
show: true
}
},
regions: [
{
axis: "x",
start: 1,
end: 2,
class: "regions_class1",
label: {
text: "Regions 1",
color: "red"
}
},
{
axis: "y",
start: 100,
end: 300,
class: "regions_class2",
label: {
text: "Regions 2",
x: 50,
color: "blue"
}
},
{
axis: "y2",
start: 200,
end: 220,
class: "regions_class3",
label: {
text: "Regions 3",
y: 10
}
}
]
}
},
RegionWithTimeseries: {
options: {
data: {
Expand Down
2 changes: 1 addition & 1 deletion demo/types/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<title>billboard.js - Supported Chart Types</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/billboard.js/dist/theme/datalab.min.css">
<script src="https://unpkg.com/billboard.js@3.7.0/dist/billboard.pkgd.min.js"></script>
<script src="https://unpkg.com/billboard.js/dist/billboard.pkgd.min.js"></script>
<link rel="stylesheet" href="./types.css">
</head>
<body>
Expand Down
Loading

0 comments on commit 11a65cd

Please sign in to comment.