1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 1× 1× | import vcharts from '../external/vcharts/src'; export default class ScatterMatrix { static get options () { return [ {name: 'data', type: 'table'}, {name: 'fields', type: 'string_list'}, {name: 'color', type: 'string'} ]; } constructor (el, options) { let chart = vcharts.chart('xymatrix', { el: el, values: options.data, fields: options.fields, color: { field: options.color } }); window.onresize = () => chart.update(); } } |