Search tutorials
Adding the chart titles
The user will enter the chart titles, select how many rows and data to enter and then enter the data. When they click the Update chart button, the information will be displayed on the bar chart.In the property inspector, I entered a click handler function for the button called UpdateChartDataFn. This function will update the titles and display the data on the chart. But to start with, we'll just use the function to update the chart titles.
The function below takes the information in the strTitle, strXTitle and strYTitle variables and sets the titles on the instance of the Bar Chart component called ThisBarChart.
function UpdateChartDataFn() {
ThisBarChart.setChartTitle(strTitle);
ThisBarChart.setXAxisTitle(strXTitle);
ThisBarChart.setYAxisTitle(strYTitle);
}
Enter the code shown above onto the functions layer and test your movie. If everything has worked properly, you should be able to type in your titles and click the Update chart button to display them on the bar chart.
| » Level Intermediate |
|
Added: 2002-08-05 Rating: 8 Votes: 41 |
| » Author |
| Applications Developer Marconi Australia |
| » Download |
| Download the files used in this tutorial. |
| Download (158 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


Comments
There are no comments yet. Be the first to comment!