Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin output js #61

Open
dooke opened this issue May 15, 2019 · 0 comments
Open

Plugin output js #61

dooke opened this issue May 15, 2019 · 0 comments

Comments

@dooke
Copy link

dooke commented May 15, 2019

Hi,

I have a problem using this plugin when i simply add the plugin output this code:

<li class="ct-series-0 inactive" data-legend="0">function () {                                                                          // 892
                                                                                                                       // 893
// If the string looks like an identifier, then we can return it as is.                                                // 894
// If the string contains no control characters, no quote characters, and no                                           // 895
// backslash characters, then we can simply slap some quotes around it.                                                // 896
// Otherwise we must also replace the offending characters with safe                                                   // 897
// sequences.                                                                                                          // 898
                                                                                                                       // 899
            if (ix.test(this)) {                                                                                       // 900
                return this;                                                                                           // 901
            }                                                                                                          // 902
            if (nx.test(this)) {                                                                                       // 903
                return '"' + this.replace(nxg, function (a) {                                                          // 904
                    var c = escapes[a];                                                                                // 905
                    if (c) {                                                                                           // 906
                        return c;                                                                                      // 907
                    }                                                                                                  // 908
                    return '\\u' + ('0000' + a.charCodeAt().toString(16)).slice(-4);                                   // 909
                }) + '"';                                                                                              // 910
            }                                                                                                          // 911
            return '"' + this + '"';                                                                                   // 912
        }
</li>

Just simply use :

require('chartist-plugin-legend');

new Chartist.Bar('.ct-chart', data, {
        stackBars: true,
        plugins: [
            Chartist.plugins.legend()
        ]
    },
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant