---+ Chart Design Overview _This page describes the basic steps and related subroutine calls for creating a simple chart._ %TOC% ---++ Description: Designing a chart can be as simple as calling two subroutines - one to initialize a new chart specification (.CHART INITIALIZE) and one to render the chart (.CHART RENDER). The following example illustrates the ILF statements needed to initialize and render a default pie chart (/tmp/piechart.png) using a previously defined dataset consisting of seven data values. <verbatim> * Initialize Pie Chart PASS PIE CHART FIELD SHARE? N GOSUB CHT .CHART INITIALIZE * Render chart SET --- TEMP 256 = /tmp/piechart.png PASS --- TEMP 256 FIELD SHARE? Y GOSUB CHT .CHART RENDER</verbatim> <br /><img width="678" alt="DefaultPieChart.png" src="%ATTACHURLPATH%/DefaultPieChart.png" height="597" /> By adding a few additional subroutine calls to set a title, seven sector labels, and a 3D view, a more useful chart can be rendered. <verbatim> * Initialize Pie Chart PASS PIE CHART FIELD SHARE? N GOSUB CHT .CHART INITIALIZE * Set a title PASS Sales % By Day of Week FIELD SHARE? N GOSUB CHT .CHART SET TITLE * Set 3D view PASS 3D FIELD SHARE? N GOSUB CHT .PIE SET VIEW * Set days of week on pie sectors PASS Monday FIELD SHARE? N GOSUB CHT .PIE SECT ADD NEW PASS Tuesday FIELD SHARE? N GOSUB CHT .PIE SECT ADD NEW PASS Wednesday FIELD SHARE? N GOSUB CHT .PIE SECT ADD NEW PASS Thursday FIELD SHARE? N GOSUB CHT .PIE SECT ADD NEW PASS Friday FIELD SHARE? N GOSUB CHT .PIE SECT ADD NEW PASS Saturday FIELD SHARE? N GOSUB CHT .PIE SECT ADD NEW PASS Sunday FIELD SHARE? N GOSUB CHT .PIE SECT ADD NEW * Render chart SET --- TEMP 256 = /tmp/piechart.png PASS --- TEMP 256 FIELD SHARE? Y GOSUB CHT .CHART RENDER</verbatim> <br /><img width="678" alt="piechart.png" src="%ATTACHURLPATH%/piechart.png" height="597" /> ---++ Comments _Read what other users have said about this page or add your own comments._ %COMMENT% -- Main.SteveFrizzell - 2010-04-01
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
png
DefaultPieChart.png
r1
manage
80.8 K
2010-04-01 - 20:08
SteveFrizzell
Default Pie Chart
png
piechart.png
r1
manage
89.0 K
2010-04-01 - 20:13
SteveFrizzell
Pie Chart
This topic: Main
>
WebHome
>
APPX510Features
>
CDChartDirectorDesignerAPI
>
CDOverviewChartDesign
Topic revision: r1 - 2010-04-01 - SteveFrizzell
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback