All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.react.js Maven / Gradle / Ivy

Go to download

The web components for chart.js which is built on lit-element ## Live Demo https://fsx950223.github.io/chartjs-web-components/live-demo/ ## Install ``` bash npm i chartjs-web-components ``` ## Lit-Element Usage ``` html <base-chart id="chart" typ

The newest version!
/*!
 * MIT License
 * 
 * Copyright (c) 2018 who who who
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 * 
 */!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=3)}([,function(t,e){t.exports=react},,function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return o}));var n=r(1);class o extends n.Component{constructor(t){super(t),this.ref=btoa(""+(Date.now()+crypto.getRandomValues(new Uint32Array(1))[0])).replace(/=/g,"")}componentDidMount(){this.chart=document.querySelector("#"+this.ref),this.chart.data=this.props.data||{},this.chart.options=this.props.options||{}}render(){return n.createElement("base-chart",{id:this.ref,type:this.props.type})}componentDidUpdate(t){Object.assign(this.chart.data,t.data||{}),Object.assign(this.chart.options,t.options||{}),this.render()}}}]);




© 2015 - 2025 Weber Informatics LLC | Privacy Policy