Преглед на файлове

Merge pull request #330 from helge79/master

Render legend after update, fixes #329
tags/v1.5.8
Shivam Mishra преди 4 години
committed by GitHub
родител
ревизия
85d7e609c8
No known key found for this signature in database GPG ключ ID: 4AEE18F83AFDEB23
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. +3
    -2
      src/js/charts/BaseChart.js

+ 3
- 2
src/js/charts/BaseChart.js Целия файл

@@ -6,12 +6,12 @@ import { BASE_MEASURES, getExtraHeight, getExtraWidth, getTopOffset, getLeftOffs
import { getColor, isValidColor } from '../utils/colors';
import { runSMILAnimation } from '../utils/animation';
import { downloadFile, prepareForExport } from '../utils/export';
import { deepClone } from '../utils/helpers'
import { deepClone } from '../utils/helpers';

export default class BaseChart {
constructor(parent, options) {
// deepclone options to avoid making changes to orignal object
options = deepClone(options)
options = deepClone(options);

this.parent = typeof parent === 'string'
? document.querySelector(parent)
@@ -233,6 +233,7 @@ export default class BaseChart {
this.data = this.prepareData(data);
this.calc(); // builds state
this.render(this.components, this.config.animate);
this.renderLegend();
}

render(components=this.components, animate=true) {


Зареждане…
Отказ
Запис