Skip to content

Commit

Permalink
Bugfix KNOWAGE-8228
Browse files Browse the repository at this point in the history
  • Loading branch information
BojanSovticEngIT committed Nov 22, 2023
1 parent 103412d commit b99b1cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export default defineComponent({
this.widget.settings = createNewHighchartsSettings()
this.widget.settings.chart.colors = tempWidgetColors
this.widget.settings.chartModel = createNewHighchartsModel(this.widget, type, oldChartModel, chartType.endsWith('Stacked'), chartType.endsWith('Inverted'))
this.widget.settings.chartModel.updateChartColorSettings(this.widget)
} else {
this.widget.type = 'chartJS'
this.widget.settings = createNewChartJSSettings()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ export default defineComponent({
},
onRowReorder(event) {
this.widget.settings.chart.colors = [...event.value]
this.updateChartModel()
emitter.emit('refreshChart', this.widgetModel.id)
},
addColor() {
this.widget.settings.chart.colors.push(this.customColorValue)
this.updateChartModel()
emitter.emit('refreshChart', this.widgetModel.id)
},
changeColor(color) {
Expand All @@ -123,8 +125,12 @@ export default defineComponent({
},
deleteColor(index) {
this.widget.settings.chart.colors.splice(index, 1)
this.updateChartModel()
emitter.emit('refreshChart', this.widgetModel.id)
},
updateChartModel() {
if (this.widget.settings.chartModel?.model) this.widget.settings.chartModel.model.colors = this.widget.settings.chart.colors
},
getContrastYIQ() {
//getContrastYIQ(hexcolor) {
// var getRGBA = function(string) {
Expand Down

0 comments on commit b99b1cc

Please sign in to comment.