juijs / jui-chart

SVG-based JUI chart that can be used in the browser and Node.js. Support many types of charts. (Dashboard, Map, Topology, Full 3D, Realtime)
https://codepen.io/collection/nLydod/
57 stars 25 forks source link

jui 버전업 후 chart format 에러 #141

Open Huntak opened 7 years ago

Huntak commented 7 years ago

원래 잘 동작하던 chart가 jui 버전업을 한 후부터 에러를 보여주네요.... 현재 버전은 jui-core 2.0.5, jui-grid 2.0.3, jui-chart 2.0.5를 사용중입니다.

Uncaught Error: JUI_CRITICAL_ERR: 'format' is not an option at Object.defineOptions (core.js:1507) at drawBrush (chart.js:1492) at UI.init.UI.render (chart.js:2270) at UI.init (chart.js:1987) at Object.createUIObject (core.js:1408) at core.js:6173 at drawChart (system.do:704) at HTMLAnchorElement. (system.do:436) at HTMLDocument.dispatch (jquery-1.8.1.min.js:2) at HTMLDocument.h (jquery-1.8.1.min.js:2)

Huntak commented 7 years ago

모든 차트에서 아래와 같이 format을 적용하였는데 저부분에서 에러가 나네요...

            brush : {
                type : "bar",
                size : 10,
                target : "count",
                colors : ["#D78265"],
                activeEvent : "mouseover",
                format : function(ve, ke) {
                    if (ve >= 1000000000)
                        return Math.round(ve / 1000000000) + "G";
                    else if (ve >= 1000000 && ve < 1000000000)
                        return Math.round(ve / 1000000) + "M";
                    else if (ve >= 1000 && ve < 1000000)
                        return Math.round(ve / 1000) + "k";
                    else
                        return ve;
                }
            },