2013-04-06 2 views

답변

1

(나는 PrimeFaces 3.4.2을 사용하고 있습니다) 나를 위해 작동하지 않는 showMarkers 속성이 존재하지만 난 숨길 수있는 방법을 발견했다.

조금 해킹 된 것 같아요. 쇼케이스에서 작동 시켰습니다. widget_category을 차트의 위젯으로 바꾸면됩니다. 웹 브라우저가 허용하는 경우에도 (크롬에서 테스트) 자바 스크립트 콘솔을 사용하여 showcase에서 온라인으로 테스트 할 수 비슷한 문제를 가진 다른 사람을 위해

// loop through the series 
for (var i = 0; i < widget_category.cfg.series.length; ++i) { 
    // Hide markers 
    widget_category.cfg.series[i].showMarker = false; 
    // I'm not sure you want this when talking about 'continuous line' 
    // but you can make your chart smooth this way : 
    widget_category.cfg.series[i].rendererOptions = { smooth: true }; 
} 

// Ask a refresh using the modified configuration object 
widget_category.refresh(widget_category.cfg); 
+0

자바 스크립트 콘솔 (Chrome)에서 테스트되었습니다. 하지만 작동하지 않습니다. – kem

3

, 내가 그랬어 :

<p:chart type="line" model="#{myController.model}"/> 

과 :

LineChartSeries serie = new LineChartSeries(); 
serie.setShowMarker(false); 

. PrimeFaces 5.1을 사용하고 있습니다.