Skip to content

Commit

Permalink
Merge pull request #1165 from skivis/download_png_charts
Browse files Browse the repository at this point in the history
Add toolbox control for for downloading chart as png
  • Loading branch information
cyberw authored Nov 20, 2019
2 parents fa2ac6b + 2f51d97 commit 989fa24
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions locust/static/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@
series: seriesData,
grid: {x:60, y:70, x2:40, y2:40},
color: colors,
toolbox: {
feature: {
saveAsImage: {
name: this.title.replace(/\s+/g, '_').toLowerCase() + '_' + Date.parse(new Date()) / 1000,
title: "Download as PNG"
}
}
}
})
}

Expand Down

0 comments on commit 989fa24

Please sign in to comment.