mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-03 11:55:52 +01:00
Fixed chart labels not parsing HTML (fixes #1234)
This commit is contained in:
@@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
1. [](#improved)
|
1. [](#improved)
|
||||||
* Removed extraneous files in vendor folder
|
* Removed extraneous files in vendor folder
|
||||||
|
1. [](#bugfix)
|
||||||
|
* Fixed chart labels not parsing HTML [#1234](https://github.com/getgrav/grav-plugin-admin/issues/1234)
|
||||||
|
|
||||||
# v1.6.1
|
# v1.6.1
|
||||||
## 09/29/2017
|
## 09/29/2017
|
||||||
|
|||||||
@@ -61,7 +61,17 @@ export default class Chart {
|
|||||||
data
|
data
|
||||||
});
|
});
|
||||||
this.chart = chartist[this.type](this.element.find('.ct-chart').empty()[0], this.data, this.options);
|
this.chart = chartist[this.type](this.element.find('.ct-chart').empty()[0], this.data, this.options);
|
||||||
this.chart.on('created', () => this.element.find('.hidden').removeClass('hidden'));
|
this.chart.on('created', () => {
|
||||||
|
this.element.find('.hidden').removeClass('hidden');
|
||||||
|
|
||||||
|
// FIX: workaround for chartist issue not allowing HTML in labels anymore
|
||||||
|
// https://github.com/gionkunz/chartist-js/issues/937
|
||||||
|
this.element.find('.ct-label').each((index, label) => {
|
||||||
|
label = $(label);
|
||||||
|
const text = label.html().replace('<', '<').replace('>', '>');
|
||||||
|
label.html(text);
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
updateData(data) {
|
updateData(data) {
|
||||||
|
|||||||
4
themes/grav/js/admin.min.js
vendored
4
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user