2012-07-05 3 views
0

Grails를 처음 사용했습니다. JFree Chart BAr 그래프를 gsp로 렌더링 할 수 없습니다. 오히려 개별 이미지로 렌더링됩니다. 내 gsp 양식과 차트를 동일한 gsp로 렌더링하고 싶습니다. 도와주세요!!!!!!Grails를 사용하여 JFreeChart를 gsp로 렌더링하는 방법

+0

동일한 링크를 제공해 줄 수 있습니까? – VVB

답변

1
def chart = ... 

def buffer = chart.createBufferesImage(700, 200) 
def bytes = EncoderUtil.encode(buffer, 'png') 

response.contentType = 'image/png' 
response.contentLength = bytes.length 
def out = response.outputStream 
out.write(bytes) 
out.flush() 
out.close() 

from Cartagena Colombia !!!

+0

조금 설명해 주시겠습니까? – VVB

관련 문제