<%@page import="SoftwareFX.ChartFX.*"%>
<%
ChartServer chart1 = new ChartServer(application,request,response );
// Fix the random data so chart always look the same
chart1.setTypeEx(chart1.getTypeEx() | ChartTypeEx.RANDOM_FIXED);
SoftwareFX.ChartFX.Annotation.AnnotationX annot = new SoftwareFX.ChartFX.Annotation.AnnotationX();
chart1.getExtensions().add(annot);
SoftwareFX.ChartFX.Annotation.AnnotationText text1 = new SoftwareFX.ChartFX.Annotation.AnnotationText();
SoftwareFX.ChartFX.Annotation.AnnotationText text2 = new SoftwareFX.ChartFX.Annotation.AnnotationText();
SoftwareFX.ChartFX.Annotation.AnnotationText text3 = new SoftwareFX.ChartFX.Annotation.AnnotationText();
annot.getList().add(text1);
annot.getList().add(text2);
annot.getList().add(text3);
// Annotation Text
text1.setText("This is an Annotation Text");
text1.setTextColor(java.awt.Color.yellow);
text1.attach(3,50);
// Non-clipped Text
text2.setText("This text is not clipped");
text2.setDrawingArea(false);
text2.setTextColor(java.awt.Color.red);
text2.setColor(new java.awt.Color(0,0,0,0));
text2.getBorder().setColor(new java.awt.Color(0,0,0,0));
text2.setTop(150);
text2.setLeft(330);
// Clipped Text
text3.setText("This text is clipped");
text3.setDrawingArea(true);
text3.setTextColor(java.awt.Color.DARK_GRAY);
text3.setColor(new java.awt.Color(0,0,0,0));
text3.getBorder().setColor(new java.awt.Color(0,0,0,0));
text3.setTop(190);
text3.setLeft(340);
%>
<%=chart1.getHtmlTag("450","280")%>
|