light-chart
Advanced tools
Sorry, the diff of this file is too big to display
+2
-2
| { | ||
| "name": "light-chart", | ||
| "version": "0.0.7", | ||
| "version": "0.0.8", | ||
| "description": "Charts for mobile visualization.", | ||
@@ -16,3 +16,3 @@ "keywords": [ | ||
| ], | ||
| "main": "adapt/f2.js", | ||
| "main": "dist/light-chart.min.js", | ||
| "homepage": "https://github.com/antvis/f2", | ||
@@ -19,0 +19,0 @@ "author": "https://github.com/orgs/antvis/people", |
-42
| import F2 from "./index" | ||
| let G2Chart=F2.Chart; | ||
| F2.Chart=function(config){ | ||
| if(config.ltCanvas){ | ||
| const context =require("./canvas/index").getContext(config.ltCanvas.$refs.canvas); | ||
| config.ltCanvas.$refs.canvas.getContext = function () { | ||
| return context; | ||
| }; | ||
| if(process.env.RUNTIME === "native"){ | ||
| config.el = new F2.Renderer(context); | ||
| Object.defineProperties(config.el, { | ||
| 'currentStyle': { | ||
| get: function () { | ||
| return Object.assign({}, config.ltCanvas.$refs.canvasWrap.classStyle, config.ltCanvas.$refs.canvasWrap.style); | ||
| } | ||
| }, | ||
| 'offsetWidth': { | ||
| get: function () { | ||
| return parseFloat(config.ltCanvas.$refs.canvasWrap.classStyle['width'] || config.ltCanvas.$refs.canvasWrap.style['width']); | ||
| } | ||
| }, | ||
| 'offsetHeight': { | ||
| get: function () { | ||
| return parseFloat(config.ltCanvas.$refs.canvasWrap.classStyle['height'] || config.ltCanvas.$refs.canvasWrap.style['height']) | ||
| } | ||
| } | ||
| }); | ||
| }else{ | ||
| config.el = config.ltCanvas.$refs.canvas; | ||
| } | ||
| config.width = +config.ltCanvas.$refs.canvas.offsetWidth; | ||
| config.height = +config.ltCanvas.$refs.canvas.offsetHeight; | ||
| } | ||
| return new G2Chart(config); | ||
| }; | ||
| // module.exports = F2; | ||
| export default F2; |
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
255087
414.89%0
-100%2
100%4
300%1
Infinity%