Example Code

Bar Chart Creation with DIAdem Script

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • Diadem

Code and Documents

Attachment

Description

Overview

This project can draw bar charts as DIAdem has no such "out of the box" functionality.

BarChart - Copy.PNG

 

Description

  • First, the report (TDR) is loaded.
  • The amounts are getting calculated.
  • We "shift" those amounts along the y-axis, otherwise the bars would be behind each other. The value of each shift equals the sum of the previously calculated amounts. The total of all those shifts (or amounts) equals 1 (or 100%).
  • Draw the bar chart.

 

Hardware and Software Requirements

DIAdem Base 2012 SP2 (or compatible)

 

Steps to Implement or Execute Code

1. Unzip Bar Chart - DIA2012SP2.zip

2. Run BarChart.VBS

Eric H.
Applications Engineering
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.