The script configures graphics options to use the ACTXIMG device. It then opens an ODS HTML destination to write the graphical output to 'c:\test.html', with the generated images in the 'c:\' folder. The GCHART procedure is used to create a 3D bar chart ('vbar3d') displaying the sum of sales ('sumvar=sales') by product ('product') from the SASHELP.SHOES table. Finally, the ODS HTML destination is closed to finalize the file creation.
Data Analysis
Type : SASHELP
The script uses the 'SHOES' table from the SASHELP library, which contains sample data on shoe sales by product.
1 Code Block
ODS and Graph Configuration
Explanation : This block initializes graphics options, specifying the 'actximg' graphics output device. It then configures the Output Delivery System (ODS) to generate HTML output, directing the document body to 'c:\test.html' and graphic files to the same 'c:\' directory.
Explanation : This block uses the GCHART procedure to create a graph. It specifies the 'sashelp.shoes' table as the data source. The 'vbar3d product / sumvar=sales' statement generates a 3D bar chart, where the bars represent different values of the 'product' variable and their length is determined by the sum of the 'sales' variable.
Explanation : This block closes the previously opened ODS HTML destination. This finalizes the creation of the 'c:\test.html' file and ensures that all subsequent ODS output is not directed to this file.
Copied!
ods html close ;
1
ods html close ;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.