This sample is located in \Samples\ActiveX\JChart.
Important To use this sample, it is recommended that you have Microsoft® Visual Basic® version 5.0 or higher installed.
Description
Using the Sample
Key Project Files
Technologies Demonstrated
This sample JavaBean displays a customizable chart. You can edit the chart in Microsoft® Visual Basic® by selecting the chart type (bar chart, column chart, line graph, pie chart), specifying the various titles that display in the chart, and entering the data rows and columns. This JavaBean has its own customizer that is not currently supported by Visual Basic.
You must have Visual Basic and Microsoft® Internet Explorer 4.0 or later installed to use this sample.
To use the sample
To view the chart, click the Start button below the applet window.
To edit the JavaBean in Visual Basic
This file creates the JChart class and implements the Serializable interface. The code defines methods (writeObject and readObject) for custom serialization of JChart so that it can be written to and read from the hard disk. The code also provides methods to set and get the properties of the chart (such as the chart type, chart size, colors, fonts, and so on) and to draw the chart based on those property values.
JChartBeanInfo.javaThis file specifies an icon for the JavaBean and creates the BeanDescriptor object that specifies the customizer for the JavaBean.
JChartCustomizer.javaThis file defines the customizer for the JChart class; the code creates a tab viewer with panels for the titles and format customizers, creates the titles and format customizers, and registers listeners for changes to the JavaBean.
JChartFormatCustomizer.javaThis file defines editors for changing the format of the chart.
JChartTitlesCustomizer.javaThis file defines editors for changing the titles displayed in the chart.