Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jiaminghi/charts

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jiaminghi/charts - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

6

CHANGELOG.md

@@ -0,1 +1,7 @@

# 0.0.1-alpha (2019-05-30)
### Perfect
- **prototype:** Add prototype function `resize`.
# 0.0.0-alpha (2019-05-29)

@@ -2,0 +8,0 @@

34

class/charts.class.js

@@ -30,2 +30,3 @@ import '../extend/index'

container: dom,
canvas,
render: new CRender(canvas),

@@ -46,21 +47,21 @@ option: null

option = deepClone(option, true)
const optionCloned = deepClone(option, true)
mergeColor(this, option)
mergeColor(this, optionCloned)
grid(this, option)
grid(this, optionCloned)
axis(this, option)
axis(this, optionCloned)
radarAxis(this, option)
radarAxis(this, optionCloned)
title(this, option)
title(this, optionCloned)
bar(this, option)
bar(this, optionCloned)
line(this, option)
line(this, optionCloned)
pie(this, option)
pie(this, optionCloned)
radar(this, option)
radar(this, optionCloned)

@@ -72,2 +73,15 @@ this.option = option

// console.warn(this)
}
Charts.prototype.resize = function () {
const { container, canvas, render, option } = this
const { clientWidth, clientHeight } = container
canvas.setAttribute('width', clientWidth)
canvas.setAttribute('height', clientHeight)
render.area = [clientWidth, clientHeight]
this.setOption(option)
}

@@ -44,3 +44,3 @@ import { radarConfig } from '../config/index'

if (radarPoint) radarPoint.forEach(item => item.forEach(g => render.delGraph(g)))
if (radarLabel) radarLine.forEach(item => item.forEach(g => render.delGraph(g)))
if (radarLabel) radarLabel.forEach(item => item.forEach(g => render.delGraph(g)))
}

@@ -47,0 +47,0 @@

{
"name": "@jiaminghi/charts",
"version": "0.0.0",
"version": "0.0.1",
"author": "JiaMing <743192023@qq.com>",

@@ -5,0 +5,0 @@ "description": "Lightweight charting",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc