Added fee distribution Pie Chart to the block inspector.
This commit is contained in:
@@ -496,9 +496,9 @@ Chartist.plugins.tooltip = function (options: any) {
|
||||
|
||||
return function tooltip(chart: any) {
|
||||
let tooltipSelector = options.pointClass;
|
||||
if (chart.constructor.name === Chartist.Bar.prototype.constructor.name) {
|
||||
if (chart instanceof Chartist.Bar) {
|
||||
tooltipSelector = 'ct-bar';
|
||||
} else if (chart.constructor.name === Chartist.Pie.prototype.constructor.name) {
|
||||
} else if (chart instanceof Chartist.Pie) {
|
||||
// Added support for donut graph
|
||||
if (chart.options.donut) {
|
||||
tooltipSelector = 'ct-slice-donut';
|
||||
@@ -542,7 +542,7 @@ Chartist.plugins.tooltip = function (options: any) {
|
||||
let value = $point.getAttribute('ct:value');
|
||||
|
||||
if (options.transformTooltipTextFnc && typeof options.transformTooltipTextFnc === 'function') {
|
||||
value = options.transformTooltipTextFnc(value);
|
||||
value = options.transformTooltipTextFnc(value, $point.parentNode.getAttribute('class'));
|
||||
}
|
||||
|
||||
if (options.tooltipFnc && typeof options.tooltipFnc === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user