Skip to content

Commit 4b407b8

Browse files
committed
build: assets and changelog for v2.0.2
1 parent 8606c87 commit 4b407b8

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## v2.0.2 (2025-08-31)
4+
5+
- fix(#320): fix download plugin.
6+
- fix: add a newline after changelog.
7+
- test: add horizontal bars to regresson.
8+
- feat: example of custom colors.
9+
- fix: cross-platform monospace font issue.
10+
- feat: upload build artifacts on failure.
11+
- test: add examples spec.
12+
- fix: run build before test.
13+
- fix: fix the snapshots from fontColor.
14+
- fix: basic-bars-stacked in examples.
15+
- fix: #329 remove jsfiddle.
16+
317
## v2.0.1 (2025-08-25)
418

519
- build: assets and changelog for v2.0.1

flotr2.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5414,7 +5414,13 @@ Flotr.addPlugin('download', {
54145414
D.insert(this.el, image);
54155415
this.saveImageElement = image;
54165416
} else {
5417-
return window.open(image.src);
5417+
// Modern browser download using data URL with hidden link
5418+
var link = document.createElement('a');
5419+
link.download = 'chart.' + type;
5420+
link.href = image.src; // image.src is the data URL from canvas.toDataURL()
5421+
document.body.appendChild(link);
5422+
link.click();
5423+
document.body.removeChild(link);
54185424
}
54195425
},
54205426

flotr2.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flotr2.nolibs.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4072,7 +4072,13 @@ Flotr.addPlugin('download', {
40724072
D.insert(this.el, image);
40734073
this.saveImageElement = image;
40744074
} else {
4075-
return window.open(image.src);
4075+
// Modern browser download using data URL with hidden link
4076+
var link = document.createElement('a');
4077+
link.download = 'chart.' + type;
4078+
link.href = image.src; // image.src is the data URL from canvas.toDataURL()
4079+
document.body.appendChild(link);
4080+
link.click();
4081+
document.body.removeChild(link);
40764082
}
40774083
},
40784084

0 commit comments

Comments
 (0)