Visual Mining contact us | site map | search

Products Solutions Resource Library Services Customers Partners Developers Company
Developers

NetCharts® Pro: OptionalChartData.java

(A Helper Application for the DrillDownExample)

 

The complete source code:

package ncpro.examples.servlet.drilldown;
import java.io.*;
import java.util.*;
import java.awt.Color;
import java.awt.Font;
import java.text.SimpleDateFormat;
import netcharts.pro.common.*;

public class OptionalChartData {

public OptionalChartData() {
}

public void setOptionalChartData(NFGraph chart) {
// For this example we'll add two NoteSet instances. The first one will
// display the date the image was created. The second will be a copyright
// that will be placed on every image.
NFNote note = new NFNote("Copyright 2002 Acme Widgets", new NFPoint(350, 265));
NFNoteSet set = new NFNoteSet(new NFModalLabel(true, Color.black, new Font("Lucinda Bright", Font.PLAIN, 6)), new NFRegion(), new NFAxisMap(NFAxisMap.PIXEL, NFAxisMap.PIXEL));
NFArrowLine aLine = new NFArrowLine(NFArrowLine.SOLID, 1, Color.black, NFArrowLine.FROMTO);
set.setLine(aLine);
chart.addNote(note, set);

SimpleDateFormat formatter = new SimpleDateFormat ("EEE, MMM d, yyyy 'at' H:m");
String dateString = formatter.format(new Date());
note = new NFNote("Created: " + dateString, new NFPoint(350, 255));
set = new NFNoteSet(new NFModalLabel(true, Color.black, new Font("Lucinda Bright", Font.PLAIN, 6)), new NFRegion(), new NFAxisMap(NFAxisMap.PIXEL, NFAxisMap.PIXEL));
aLine = new NFArrowLine(NFArrowLine.SOLID, 1, Color.black, NFArrowLine.FROMTO);
set.setLine(aLine);
chart.addNote(note, set);

return;
}
}



© 2008 Visual Mining, Inc. All rights reserved.
1-800-308-0731 | info@visualmining.com | privacy statement | legal
15825 Shady Grove Rd., Suite 20, Rockville, MD 20850 USA

Quote: Hyperion