728x90
๋ฐ˜์‘ํ˜•

echarts 3

[echarts]chart click event ์ ์šฉํ•˜๊ธฐ

https://dullyshin.github.io/2020/03/12/Echarts-Event01/ Echarts-์ฐจํŠธ์— ํด๋ฆญ ์ด๋ฒคํŠธ ์ƒ์„ฑํ•˜๊ธฐ 01 Echarts-์ฐจํŠธ์— ํด๋ฆญ ์ด๋ฒคํŠธ ์ƒ์„ฑํ•˜๊ธฐ 01์ฐจํŠธ์— ํด๋ฆญ ์ด๋ฒคํŠธ๋ฅผ ์ƒ์„ฑํ•ด๋ณด์ž์šฐ์„  ์ฐจํŠธ์˜ ํด๋ฆญ ์ด๋ฒคํŠธ๋ฅผ ๋งŒ๋“ค๊ธฐ ์œ„ํ•ด ์•„๋ž˜์™€ ๊ฐ™์ด ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.์•„๋ž˜์˜ ๋ฐฉ๋ฒ•์œผ๋กœ params ์— ๋ฌด์Šจ ๊ฐ’์ด ๋„˜์–ด์˜ค๋Š”์ง€ dullyshin.github.io

Front/JS & jQuery 2023.10.12

[echarts] formatter - ์ˆซ์ž ๋ฐ์ดํ„ฐ์— ์ฒœ ๋‹จ์œ„ ,(์ฝค๋งˆ) ์ฐ๊ธฐ

option ={ data: [42779,21382,13007,8390] series:[ label:{ show: true, formatter: function (params){ var val = addComma(params.value); return val; } } ] }; /* ์ฒœ๋‹จ์œ„ ์ฝค๋งˆ */ function addComma(value){ value = value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); return value; } ํ•„์š”ํ•œ ๋ถ€๋ถ„๋งŒ ์ฝ”๋“œ๋ฅผ ์ ์–ด๋†“์•˜๋‹ค !

Front/JS & jQuery 2022.05.16

[echarts] ๋ฐ์ดํ„ฐ๋ฅผ ์ฐจํŠธ ์•ˆ์— ํ‘œ์‹œํ•˜๊ธฐ

1. ๋ง‰๋Œ€๊ทธ๋ž˜ํ”„ option์•ˆ์— series์•ˆ์— lable์— show: true๋กœ ์„ค์ •ํ•˜๋ฉด ๋œ๋‹ค. option = { tooltip: {}, legend: {}, xAxis: { data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] }, yAxis: {}, series: [{ name: "Sale", type: "bar", data: [5, 20, 36, 10, 10, 20, 4], label: { show: true, } }] } 2. ํŒŒ์ด๊ทธ๋ž˜ํ”„ ํŒŒ์ด ๊ทธ๋ž˜ํ”„๋Š” lable์— show: true ๋กœ ์„ค์ •ํ•˜๋ฉด ๋ฒ”๋ก€๋ชฉ๋ก๋งŒ ํ‘œ์‹œ๊ฐ€ ๋œ๋‹ค. ๋ฐ์ดํ„ฐ๋ฅผ ํ‘œ์‹œํ•˜๋ ค๋ฉด, formatter๋ฅผ ์‚ฌ์šฉํ•ด์•ผํ•œ๋‹ค. {a}: ์‹œ๋ฆฌ์ฆˆ ์ด๋ฆ„. {b}: ๋ฐ์ดํ„ฐ ํ•ญ๋ชฉ์˜ ์ด๋ฆ„์ž…๋‹ˆ๋‹ค. {c}: ๋ฐ์ดํ„ฐ..

Front/JS & jQuery 2022.05.14
728x90
๋ฐ˜์‘ํ˜•