How to use the juijs-chart.include function in juijs-chart

To help you get started, we’ve selected a few juijs-chart examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github juijs / vue-graph / src / base / methods-timerange.js View on Github external
convertToData: function(values) {
            let util = JUI.include('util.base');
            let data = [];

            for(let i = 0; i < values.length; i++) {
                let val = values[i];

                if(util.typeCheck('array', val)) {
                    data.push({
                        '0': val[0],
                        '1': val[1]
                    });
                }
            }

            return data;
        },
        initGraphAxes: function() {
github juijs / vue-graph / src / components / comparisonarea.js View on Github external
beforeMount: function() {
        const _ = JUI.include('util.base')

        let colors = !this.colors ? [ 0, 1 ] : this.colors;

        let options = {
            type: 'area',
            clip: this.clip,
            symbol: this.shape,
            opacity: this.opacity,
            line: this.borderLine,
            display: this.display
        }

        this.brushes = [
            _.extend({ target: '0', axis: 0, colors: [ colors[0] ] }, options),
            _.extend({ target: '1', axis: 1, colors: [ colors[1] ] }, options)
        ]
github juijs / vue-graph / src / components / comparisonbar.js View on Github external
beforeMount: function() {
        const _ = JUI.include('util.base')

        let colors = !this.colors ? [ 1, 2 ] : this.colors;

        let options = {
            type: 'bar',
            clip: this.clip,
            active: this.activeIndex,
            activeEvent: this.activeEvent,
            display: this.display,
            size: this.fixedSize,
            minSize: this.minValue,
            outerPadding: this.barMargin,
            innerPadding: this.barPadding
        }

        this.brushes = [
github juijs / vue-graph / src / widgets / guideline.js View on Github external
beforeMount: function(e) {
        const time = jui.include('util.time');
        const format = this.$parent.axisFormat;

        let formatFunc = function(value) {
            if(typeof(value) == 'object' && typeof(format) == 'string') {
                return time.format(value, format);
            } else if(typeof(value) == 'number') {
                return Math.round(value);
            }

            return value;
        }

        let opts = { type: 'cross' };
        if(this.tooltipX) opts.xFormat = formatFunc;
        if(this.tooltipY) opts.yFormat = formatFunc;
github juijs / vue-graph / src / base / methods.js View on Github external
convertToData: function(values) {
            let util = JUI.include('util.base');
            let data = [];

            for(let i = 0; i < values.length; i++) {
                let val = values[i];

                if(util.typeCheck('array', val)) {
                    for(let j = 0; j < val.length; j++) {
                        if(i == 0) {
                            data.push({});
                        }

                        let row = data[j];
                        row[''+i] = val[j]
                    }
                } else if(util.typeCheck('number', val)) {
                    data.push({ '0' : val });

juijs-chart

SVG-based JUI chart that can be used in the browser and Node.js. Support many types of charts. (Dashboard, Map, Topology, Full 3D)

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis