Merge branch 'master' into simon/angular-universal
* master: Add the Commons Clause License Condition v1.0 to our MIT License fix legend bug on resize Correcting new chartist import path. Flip mempool chart by using patched chartist package by @techmix # Conflicts: # frontend/package-lock.json
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
ViewEncapsulation
|
||||
} from '@angular/core';
|
||||
|
||||
import * as Chartist from 'chartist';
|
||||
import * as Chartist from '@mempool/chartist';
|
||||
|
||||
/**
|
||||
* Possible chart types
|
||||
@@ -319,7 +319,11 @@ Chartist.plugins.legend = function (options: any) {
|
||||
|
||||
chart.on('created', function (data: any) {
|
||||
|
||||
if (isSelfUpdate)
|
||||
const useLabels = chart instanceof Chartist.Pie && chart.data.labels && chart.data.labels.length;
|
||||
const legendNames = getLegendNames(useLabels);
|
||||
var dirtyChartData = (chart.data.series.length < legendNames.length);
|
||||
|
||||
if (isSelfUpdate || dirtyChartData)
|
||||
return;
|
||||
|
||||
function removeLegendElement() {
|
||||
@@ -476,8 +480,6 @@ Chartist.plugins.legend = function (options: any) {
|
||||
removeLegendElement();
|
||||
|
||||
const legendElement = createLegendElement();
|
||||
const useLabels = chart instanceof Chartist.Pie && chart.data.labels && chart.data.labels.length;
|
||||
const legendNames = getLegendNames(useLabels);
|
||||
const seriesMetadata = initSeriesMetadata(useLabels);
|
||||
const legends: any = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user