Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f9554314e | ||
|
|
c7997758bd | ||
|
|
5bc85376a3 | ||
|
|
e6c34e2d49 | ||
|
|
66ce742311 | ||
|
|
cd56963f6e | ||
|
|
ce43d0b97c | ||
|
|
d1ce67f9e5 | ||
|
|
072a98da5c | ||
|
|
27198d12b8 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,5 +1,19 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2.5.0 - 2023-02-01
|
||||||
|
- Added tooltip override via `extras.tooltip`
|
||||||
|
|
||||||
|
## 2.4.2 - 2023-02-01
|
||||||
|
- Fixed hover title on column chart
|
||||||
|
|
||||||
|
## 2.4.1 - 2022-02-18
|
||||||
|
- Fixed xAxis auto-categories for MultiColumnChart
|
||||||
|
|
||||||
|
## 2.4.0 - 2022-02-14
|
||||||
|
- Added Radar Chart (thanks to @AlexHupe)
|
||||||
|
- Added Tree Map Chart
|
||||||
|
- Added "donut" type to Pie Chart (thanks to @nicko170)
|
||||||
|
|
||||||
## 2.3.0 - 2021-02-12
|
## 2.3.0 - 2021-02-12
|
||||||
- Added `init()` method for better boot and $wire hoisting
|
- Added `init()` method for better boot and $wire hoisting
|
||||||
- Added color customization for columns, multiline and pie chart
|
- Added color customization for columns, multiline and pie chart
|
||||||
|
|||||||
@@ -17,12 +17,12 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.2|^7.3|^7.4|^8.0",
|
"php": "^7.2|^7.3|^7.4|^8.0",
|
||||||
"illuminate/support": "^7.0|^8.0|^9.0",
|
"illuminate/support": "^7.0|^8.0|^9.0|^10.0",
|
||||||
"livewire/livewire": "^2.3"
|
"livewire/livewire": "^2.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"orchestra/testbench": "^5.0|^6.0|^7.0",
|
"orchestra/testbench": "^5.0|^6.0|^7.0|^8.0",
|
||||||
"phpunit/phpunit": "^8.0"
|
"phpunit/phpunit": "^8.0|^9.5.10"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
@@ -37,7 +37,6 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "vendor/bin/phpunit",
|
"test": "vendor/bin/phpunit",
|
||||||
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
|
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
|
||||||
|
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"sort-packages": true
|
"sort-packages": true
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -14,6 +14,7 @@ const columnChart = () => {
|
|||||||
this.chart.destroy()
|
this.chart.destroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const title = component.get('columnChartModel.title')
|
||||||
const animated = component.get('columnChartModel.animated') || false;
|
const animated = component.get('columnChartModel.animated') || false;
|
||||||
const onColumnClickEventName = component.get('columnChartModel.onColumnClickEventName')
|
const onColumnClickEventName = component.get('columnChartModel.onColumnClickEventName')
|
||||||
const dataLabels = component.get('columnChartModel.dataLabels') || {};
|
const dataLabels = component.get('columnChartModel.dataLabels') || {};
|
||||||
@@ -24,7 +25,10 @@ const columnChart = () => {
|
|||||||
const horizontal = component.get('columnChartModel.horizontal');
|
const horizontal = component.get('columnChartModel.horizontal');
|
||||||
|
|
||||||
const data = component.get('columnChartModel.data');
|
const data = component.get('columnChartModel.data');
|
||||||
const series = [{ data: data.map(item => item.value)}]
|
const series = [{
|
||||||
|
name: title,
|
||||||
|
data: data.map(item => item.value)
|
||||||
|
}]
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
series: series,
|
series: series,
|
||||||
@@ -80,13 +84,21 @@ const columnChart = () => {
|
|||||||
|
|
||||||
yaxis: {
|
yaxis: {
|
||||||
title: {
|
title: {
|
||||||
text: component.get('columnChartModel.title'),
|
text: title,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
fill: {
|
fill: {
|
||||||
opacity: component.get('columnChartModel.opacity') || 0.5
|
opacity: component.get('columnChartModel.opacity') || 0.5
|
||||||
},
|
},
|
||||||
|
|
||||||
|
tooltip: {
|
||||||
|
y: {
|
||||||
|
formatter: function(value, series) {
|
||||||
|
return data[series.dataPointIndex].extras.tooltip || value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const colors = component.get('columnChartModel.colors');
|
const colors = component.get('columnChartModel.colors');
|
||||||
|
|||||||
@@ -96,6 +96,14 @@ const lineChart = () => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
tooltip: {
|
||||||
|
y: {
|
||||||
|
formatter: function(value, series) {
|
||||||
|
return data[series.dataPointIndex].extras.tooltip || value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
this.chart = new ApexCharts(this.$refs.container, options);
|
this.chart = new ApexCharts(this.$refs.container, options);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ const multiColumnChart = () => {
|
|||||||
this.chart.destroy()
|
this.chart.destroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const title = component.get('columnChartModel.title')
|
||||||
const stacked = component.get('columnChartModel.isStacked');
|
const stacked = component.get('columnChartModel.isStacked');
|
||||||
const animated = component.get('columnChartModel.animated');
|
const animated = component.get('columnChartModel.animated');
|
||||||
const onColumnClickEventName = component.get('columnChartModel.onColumnClickEventName')
|
const onColumnClickEventName = component.get('columnChartModel.onColumnClickEventName')
|
||||||
@@ -33,7 +34,7 @@ const multiColumnChart = () => {
|
|||||||
|
|
||||||
const categories = component.get('columnChartModel.xAxis.categories').length > 0
|
const categories = component.get('columnChartModel.xAxis.categories').length > 0
|
||||||
? component.get('columnChartModel.xAxis.categories')
|
? component.get('columnChartModel.xAxis.categories')
|
||||||
: []
|
: data[series[0].name].map(item => item.title)
|
||||||
;
|
;
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
@@ -81,7 +82,7 @@ const multiColumnChart = () => {
|
|||||||
|
|
||||||
yaxis: {
|
yaxis: {
|
||||||
title: {
|
title: {
|
||||||
text: component.get('columnChartModel.title'),
|
text: title,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,14 @@ const pieChart = () => {
|
|||||||
],
|
],
|
||||||
|
|
||||||
legend: component.get('pieChartModel.legend') || {},
|
legend: component.get('pieChartModel.legend') || {},
|
||||||
|
|
||||||
|
tooltip: {
|
||||||
|
y: {
|
||||||
|
formatter: function(value, series) {
|
||||||
|
return data[series.dataPointIndex].extras.tooltip || value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const colors = component.get('pieChartModel.colors');
|
const colors = component.get('pieChartModel.colors');
|
||||||
|
|||||||
Reference in New Issue
Block a user