
Download this file:
DailyPageHit.zip shows the total number of page requests on several different days.

This visualization is actually reather elementary to create. The data is stored in a text file. Each line of the file is a different day, and each line merely contains the number of hits for that day. Then to create the bars we loop through all the lines in the file reading in the values and then create the bars with the following code:
-- //Create the new Objects cube = vtkCubeSource::New(); //Rotate the Actor and Set the size of the bars cubeMapper->SetInput(cube->GetOutput()); //Position the Actors cube->SetCenter(0, (i + 1) * 2, (barWidth
/ scaleMode) / 2); -- |
Note that in the above code to position the cube we do so by setting it's center. Because of this we need to set the center z value equal to the zLength / 2. This is so that the left edges of the cubes will line up properly.
| Home C++ Tutorial Python Tutorial TCL/TK Tutorial Downloads Homework About Us Contact Links |
| C++ Tutorial Part 1: VS 6 Part 2: VS .NET Part 3: SUU Logs |