Get graphics from VisualizationComponent rapidminer
Hi,
How to get graphics or image from visualization component??
i have visualization component the same i am passing to JFrame tree is displaying in standalone app.
but in WebApplications it is not coming as Jframe will work for standalone apps.
Component visualizationComponent = gr.getVisualizationComponent(model, ioResult);
visualizationComponent .getGraph()...............>returns null even though visualization.isDisplayable() returns true.
if i use renderer where it will render ?
i want to get the tree and display in Application by setting some variable.
Thanks in advance
How to get graphics or image from visualization component??
i have visualization component the same i am passing to JFrame tree is displaying in standalone app.
but in WebApplications it is not coming as Jframe will work for standalone apps.
Component visualizationComponent = gr.getVisualizationComponent(model, ioResult);
visualizationComponent .getGraph()...............>returns null even though visualization.isDisplayable() returns true.
if i use renderer where it will render ?
i want to get the tree and display in Application by setting some variable.
Thanks in advance
Sort by:
1 - 3 of
31
I have used it but it is giving rectangle
Renderer renderer = RendererService.createRenderer(result, "Graph View");
Reportable reportable = renderer.createReportable(result, dummy, imgWidth, imgHeight);
pls correct me if i am wrong
the BufferedImage img i nee to get from rapidminer component
final BufferedImage img = new BufferedImage(imgWidth, imgHeight, BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = (Graphics2D) img.getGraphics();
graphics.setColor(Color.WHITE);
graphics.fillRect(0, 0, imgWidth, imgHeight);
double scale = Math.min((double) imgWidth / (double) preferredWidth, (double) imgHeight / (double) preferredHeight);
graphics.scale(scale, scale);
and i have a query on redering
renderable.render(graphics, preferredWidth, preferredHeight);
where it will render the tree??
Thanks a lot for bearing me
Renderer renderer = RendererService.createRenderer(result, "Graph View");
Reportable reportable = renderer.createReportable(result, dummy, imgWidth, imgHeight);
pls correct me if i am wrong
the BufferedImage img i nee to get from rapidminer component
final BufferedImage img = new BufferedImage(imgWidth, imgHeight, BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = (Graphics2D) img.getGraphics();
graphics.setColor(Color.WHITE);
graphics.fillRect(0, 0, imgWidth, imgHeight);
double scale = Math.min((double) imgWidth / (double) preferredWidth, (double) imgHeight / (double) preferredHeight);
graphics.scale(scale, scale);
and i have a query on redering
renderable.render(graphics, preferredWidth, preferredHeight);
where it will render the tree??
Thanks a lot for bearing me
why don't you use the solution I presented to you in this thread?
Regards,
Marco