svelte-echarts
Advanced tools
Comparing version
@@ -1,3 +0,2 @@ | ||
export { default as Chart } from './Chart.svelte'; | ||
export { chartable } from './Chart.svelte'; | ||
export type { EChartsOptions, EChartsTheme, EChartsRenderer, ChartOptions, } from './Chart.svelte'; | ||
export { default as Chart } from './components/Chart.svelte'; | ||
export type { ECMouseEvent, ECInteractionEvent } from './constants/events'; |
@@ -1,2 +0,1 @@ | ||
export { default as Chart } from './Chart.svelte'; | ||
export { chartable } from './Chart.svelte'; | ||
export { default as Chart } from './components/Chart.svelte'; |
{ | ||
"name": "svelte-echarts", | ||
"version": "0.1.1", | ||
"license": "MIT", | ||
"version": "1.0.0-rc1", | ||
"repository": { | ||
@@ -17,5 +16,7 @@ "type": "git", | ||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", | ||
"lint": "prettier --check . && eslint .", | ||
"test": "vitest run", | ||
"lint": "prettier --check .", | ||
"format": "prettier --write .", | ||
"test": "echo \"No tests yet\"" | ||
"test:ui": "vitest --ui", | ||
"test:watch": "vitest" | ||
}, | ||
@@ -34,17 +35,18 @@ "exports": { | ||
"peerDependencies": { | ||
"echarts": "^5.4.3", | ||
"echarts": "^5.0.0", | ||
"svelte": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/adapter-auto": "^2.0.0", | ||
"@sveltejs/adapter-static": "^2.0.3", | ||
"@sveltejs/kit": "^1.27.4", | ||
"@sveltejs/adapter-auto": "^3.0.0", | ||
"@sveltejs/adapter-static": "^3.0.1", | ||
"@sveltejs/kit": "^2.0.0", | ||
"@sveltejs/package": "^2.0.0", | ||
"@typescript-eslint/eslint-plugin": "^6.0.0", | ||
"@typescript-eslint/parser": "^6.0.0", | ||
"eslint": "^8.28.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-svelte": "^2.30.0", | ||
"prettier": "^3.0.0", | ||
"prettier-plugin-svelte": "^3.0.0", | ||
"@sveltejs/vite-plugin-svelte": "^3.0.0", | ||
"@testing-library/svelte": "^5.1.0", | ||
"@vitest/coverage-v8": "^1.6.0", | ||
"@vitest/ui": "^1.6.0", | ||
"echarts": "^5.5.0", | ||
"jsdom": "^24.0.0", | ||
"prettier": "^3.1.1", | ||
"prettier-plugin-svelte": "^3.1.2", | ||
"publint": "^0.1.9", | ||
@@ -55,3 +57,4 @@ "svelte": "^4.2.7", | ||
"typescript": "^5.0.0", | ||
"vite": "^4.4.2" | ||
"vite": "^5.0.11", | ||
"vitest": "^1.6.0" | ||
}, | ||
@@ -61,2 +64,2 @@ "svelte": "./dist/index.js", | ||
"type": "module" | ||
} | ||
} |
@@ -14,9 +14,21 @@ # svelte-echarts | ||
```html | ||
<script lang="ts"> | ||
import { Chart, type EChartsOptions } from 'svelte-echarts' | ||
<script> | ||
import { Chart } from 'svelte-echarts' | ||
const options: EChartsOptions = { | ||
import { init, use } from 'echarts/core' | ||
import type { EChartsOption } from 'echarts' | ||
import { BarChart } from 'echarts/charts' | ||
import { GridComponent, TitleComponent } from 'echarts/components' | ||
import { CanvasRenderer } from 'echarts/renderers' | ||
// now with tree-shaking | ||
use([BarChart, GridComponent, CanvasRenderer, TitleComponent]) | ||
let options = { | ||
title: { | ||
text: 'ECharts Example', | ||
}, | ||
xAxis: { | ||
type: 'category', | ||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], | ||
type: 'category', | ||
}, | ||
@@ -28,4 +40,4 @@ yAxis: { | ||
{ | ||
data: [820, 932, 901, 934, 1290, 1330, 1320], | ||
type: 'bar', | ||
data: [120, 200, 150, 80, 70, 110, 130], | ||
}, | ||
@@ -37,3 +49,3 @@ ], | ||
<div class="app"> | ||
<Chart {options} /> | ||
<Chart {init} {options} /> | ||
</div> | ||
@@ -40,0 +52,0 @@ |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
23447
304.33%11
57.14%150
316.67%2
-33.33%57
26.67%19
11.76%1
Infinity%