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

Line차트 brush 관련 질문 #216

Open dldbwn opened 5 years ago

dldbwn commented 5 years ago

image

brush옵션을 display:max로 줬을때 데이터가 뭉쳐서 보이지가 않습니다. 전체 데이터중 max값 하나만 표현하고싶은데 방법이 있을까요?

seogi1004 commented 5 years ago

라인 브러쉬를 하나만 쓰지말고, target 개수만큼 라인 브러쉬를 여러개 추가해서 사용하세요. 각각의 라인 브러쉬는 하나의 라인에 대한 target만 가지고 있으면 됩니다.

brush: [ { type: "line", target: [ "propertyA" ], display: "max" }, { type: "line", target: [ "propertyB" ] }, ... ]

dldbwn commented 5 years ago

저렇게 하니까 legend가 display:max햇던 타겟만 나오네요ㅜㅜ 레전드가 하나만나와요

seogi1004 commented 5 years ago

아래와 같이 설정하면 됩니다. ㅠ_ㅠ { type : "legend", brush: [0,1,2] }