|
10 | 10 | if (chart.options.exportEnabled) { |
11 | 11 | var exportJSON = document.createElement('div'); |
12 | 12 | var text = document.createTextNode("Save as JSON"); |
13 | | - exportJSON.setAttribute("style", "padding: 12px 8px; background-color: white; color: black") |
| 13 | + exportJSON.setAttribute("style", "padding: 12px 8px; background-color: " + chart.toolbar.backgroundColor + "; color: " + chart.toolbar.fontColor); |
14 | 14 | exportJSON.appendChild(text); |
15 | 15 | exportJSON.addEventListener("mouseover", function () { |
16 | | - exportJSON.setAttribute("style", "padding: 12px 8px; background-color: #2196F3; color: white") |
| 16 | + exportJSON.setAttribute("style", "padding: 12px 8px; background-color: " + chart.toolbar.backgroundColorOnHover + "; color: " + chart.toolbar.fontColorOnHover); |
17 | 17 | }); |
18 | 18 | exportJSON.addEventListener("mouseout", function () { |
19 | | - exportJSON.setAttribute("style", "padding: 12px 8px; background-color: white; color: black") |
| 19 | + exportJSON.setAttribute("style", "padding: 12px 8px; background-color: " + chart.toolbar.backgroundColor + "; color: " + chart.toolbar.fontColor); |
20 | 20 | }); |
21 | 21 | exportJSON.addEventListener("click", function () { |
22 | 22 | parseJSON({ |
|
31 | 31 | var exportButton = document.createElement('button'); |
32 | 32 | var chartBound = chart.container.getBoundingClientRect(); |
33 | 33 |
|
34 | | - exportButton.style.cssText = "position:relative;display: inline-block;padding: 0px 4px;width: 35px;height: 27px;cursor: pointer;text-align: center;text-decoration: none;background-color: #fff;border: 1px solid rgb(33, 150, 243);left:" + (chart.container.clientWidth - (chart.options.zoomEnabled ? 115 : 60)) + "px; top: 1px"; |
| 34 | + exportButton.style.cssText = "position:relative;display: inline-block;padding: 0px 4px;width: 35px;height: 27px;cursor: pointer;text-align: center;text-decoration: none;background-color: " + chart.toolbar.backgroundColor + ";border: 1px solid " + chart.toolbar.borderColor + ";left:" + (chart.container.clientWidth - (chart.options.zoomEnabled ? 115 : 60)) + "px; top: 1px"; |
35 | 35 | var img = document.createElement("IMG"); |
36 | 36 | img.setAttribute("src", base64Img); |
37 | 37 | exportButton.appendChild(img); |
38 | 38 | exportButton.addEventListener("mouseover", function () { |
39 | | - this.style.cssText = this.style.cssText + "background-color: rgb(33, 150, 243)"; |
| 39 | + this.style.cssText = this.style.cssText + "background-color: " + chart.toolbar.backgroundColorOnHover; |
40 | 40 | }); |
41 | 41 | exportButton.addEventListener("mouseout", function () { |
42 | | - this.style.cssText = this.style.cssText + "background-color: #fff;"; |
| 42 | + this.style.cssText = this.style.cssText + "background-color: " + chart.toolbar.backgroundColor; |
43 | 43 | }); |
44 | 44 | exportButton.addEventListener("click", function () { |
45 | 45 | parseJSON({ |
|
0 commit comments