Skip to content

Commit

Permalink
new property - datalabels.distributed
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed Mar 5, 2020
1 parent 95d6c0f commit 45f428d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/modules/DataLabels.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ class DataLabels {

let dataLabelColor = w.globals.dataLabels.style.colors[i]
if (
(w.config.chart.type === 'bar' || w.config.chart.type === 'rangeBar') &&
w.config.plotOptions.bar.distributed
((w.config.chart.type === 'bar' || w.config.chart.type === 'rangeBar') &&
w.config.plotOptions.bar.distributed) ||
w.config.dataLabels.distributed
) {
dataLabelColor = w.globals.dataLabels.style.colors[j]
}
Expand Down
1 change: 1 addition & 0 deletions src/modules/settings/Options.js
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ export default class Options {
return val !== null ? val : ''
},
textAnchor: 'middle',
distributed: false,
offsetX: 0,
offsetY: 0,
style: {
Expand Down
1 change: 1 addition & 0 deletions types/apexcharts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ type ApexDataLabels = {
enabled?: boolean
enabledOnSeries?: undefined | number[]
textAnchor?: 'start' | 'middle' | 'end'
distributed?: boolean
offsetX?: number
offsetY?: number
style?: {
Expand Down

0 comments on commit 45f428d

Please sign in to comment.