Sha256: dbd6fa0fbae8253a6ffe17f3c42be0b7f7e1a69ad594b99fc25017bb59d7ffec
Contents?: true
Size: 868 Bytes
Versions: 5
Compression:
Stored size: 868 Bytes
Contents
module Echarts module Binary def self.get_config(value, title, subtitle, yLabel) { grid: { top: 80, }, title: { text: title, subtext: subtitle, }, toolbox: { feature: { saveAsImage: {}, }, }, tooltip: { trigger: "axis", }, series: [ { name: 'Alert', type: 'pie', radius: '50%', data: [ { value: value, name: yLabel, itemStyle: { color: value == 0 ? 'limegreen' : 'tomato' } }, ], emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } }, }, ], } end end end
Version data entries
5 entries across 5 versions & 1 rubygems