ski

command
v0.0.0-...-659b40f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 20 Imported by: 0

README

ski

Install

go install github.com/shiroyk/ski/ski

Example

Render ECharts svg

cat << EOF | ski -
import echarts from "https://unpkg.com/echarts@5"

globalThis.global = {  __DEV__: true };

let chart = echarts.init(null, null, {
  renderer: 'svg',
  ssr: true,
  width: 400,
  height: 300
});

chart.setOption({
  title: {
    text: 'ECharts entry example'
  },
  backgroundColor: 'white',
  tooltip: {},
  legend: {
    data:['Sales']
  },
  xAxis: {
    data: ["shirt","cardign","chiffon shirt","pants","heels","socks"]
  },
  yAxis: {},
  series: [{
    name: 'Sales',
    type: 'bar',
    data: [5, 20, 36, 10, 10, 20]
  }]
});

export default () => {
  const svg = chart.renderToSVGString();
  chart.dispose();
  return svg;
};
EOF

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL