1
0
mirror of https://github.com/elisspace/FxLifeSheet.git synced 2026-08-29 15:44:00 +00:00

Fix invert color range

This commit is contained in:
Felix Krause
2022-03-02 16:46:54 +01:00
parent 9ef155587e
commit 0e0e8d4151

View File

@@ -181,7 +181,7 @@ function renderPieHistoryChart(yearsData, key, groupByMonth, nodeId) {
let colorToUse = null;
if (colors) {
colorToUse = invertedColors ? colors[numberOfValues - 1 - i] : colors[i]
colorToUse = invertedColors ? colors[numberOfValues - i] : colors[i]
}
data.push({
@@ -230,7 +230,7 @@ function renderPieHistoryChart(yearsData, key, groupByMonth, nodeId) {
linkText: 'Customize'
};
Plotly.newPlot(nodeId, data, layout, config).then(function(gd) {
Plotly.toImage(gd, { height: 650, width: 1000, format: "svg" }).then(function(base64) {
Plotly.toImage(gd, { height: 800, width: 1300, format: "svg" }).then(function(base64) {
document.getElementById('svg-export-' + nodeId).setAttribute("src", base64);
})
});