DE_CHART

This command sets the contents of any chart window on the data entry screen.

For any row of the template, you can use this command to display a different type of SPC chart, an HTML file, a web page or a string of HTML code in that row's chart window.

Important note

GainSeeker converts three backslashes ( \\\ ) to two ( \\ ) for literal (UNC) filename parameters (for example:  \\\hsdc01xz\data\xfer\mtc.htm). If you were to instead use two backslashes as in this example, \\hsdc01xz\data\xfer\mtc.htm , it results in a filename of \hsdc01xz\data\xfer\mtc.htm , which is invalid as a UNC. This is because the double backslash is considered an escape sequence, and the system auto-converts it to a single backslash.

However, if the filename parameter is a variable (for example: MySvar "Path"), use should only use two backslashes. Using three slashes in this event causes an error.

If you are upgrading from GainSeeker version 8.0 or earlier and using UNC paths, you must update your templates to reflect this.

Syntax

DE_CHART row_number, content_type, "content", "caption"

The row_number specifies which chart window you are changing.

The content_type specifies the type of information to display in the chart window. Valid options for this parameter are:

content_type

explanation

0

Clear the contents of the chart window

1

Control chart for the SPC standard on the specified row

2

Histogram for the SPC standard on the specified row

3

Combination chart for the SPC standard on the specified row

4

CuSum/Control chart for the SPC standard on the specified row

300

File (dynamic)

The chart window for a dynamic file will be updated each time the template changes to that row and each time the DE_CHART command is used to set the content for that row.

301

URL (dynamic)

The chart window for a dynamic URL will be updated each time the template changes to that row and each time the DE_CHART command is used to set the content for that row.

302

File (static)

The chart window for a dynamic file will only be updated if the DE_CHART command is used again to change the content for that row.

303

URL (static)

The chart window for a static URL will only be updated if the DE_CHART command is used again to change the content for that row.

304

String of HTML code

Instead of saving an HTML file and displaying it in the chart window, you can use the template to dynamically build an HTML string and display it as a web page in the chart window.

Getting JavaScript errors? See Information about Turning off JavaScript errors

The content parameter specifies what information will be displayed in the chart window. Valid options for this parameter depend on the content_type you specify:

content_type

content

explanation

0
(No chart)

""

Not used - no content is being displayed.

1 - 4
(SPC charts)

""

Not used - chart contains data for the SPC standard on the specified row.

300 and 302
(File, dynamic or static)

"file_path\filename.ext"

You may specify any type of file that can be opened by a web browser, such as .html, .gif, .jpg, etc.

The file path must begin with a drive letter. To express a file path in Universal Naming Convention (UNC) format, use content_type 301 (URL dynamic) or 303 (URL static).

To specify a bookmarked location within a file, such as "Q:\Files\important.htm#Section3", use content_type 301 (URL dynamic) or 303 (URL static).

Tip: You may want to substitute a CHT_SPC, CHT_DMS or CHT_DASH command for this parameter. Each of these commands will create an HTML file and return the path and filename of this new HTML file.

When e-mailing the contents of this chart window, the specified file will be attached to – or embedded – in the e-mail message.

301 and 303
(URL, dynamic or static)

"web_page_address"

You may specify any web page address in various formats, such as:

 "google.com"

 "www.google.com"

 "http://www.google.com"

 "google.com/intl/en/about.html"

 "google.com/intl/en/about.html#Staff"

Alternately, you can also specify a UNC path and filename, such as "file:// MyServer/Files/ important.htm", or a file name where the path begins with a drive letter, such as "Q:\ Files\important.htm".

If the chart window cannot display the web page or file you specify, it will display a message such as "Page cannot be displayed".

When e-mailing the contents of this chart window, an HTML file with a link to this URL will be attached to – or embedded in – the e-mail message.

304
(HTML code)

"HTML_code"

Any HTML tags that cannot be interpreted in the <BODY></BODY> section of an HTML page will be ignored.

For example, tags like <style> or <link> can only be interpreted when they appear in the <HEAD></HEAD> section of an HTML page. If you include these tags in the "HTML_code" string, they will be ignored because they cannot be interpreted in the <BODY></BODY> section of an HTML page.

If you need to use HTML code that includes other sections such as <HTML></HTML> or <HEAD></HEAD>, you should use a command like FPRINT to write this HTML code to a file and then use DE_CHART with a content_type option 300, 301, 302 or 303 to display the full HTML file.

The caption provides text for the title bar on the chart window and for the Interact menu option. Valid options for this parameter depend on the content_type you specify:

content_type

caption

explanation

0
(No chart)

""

Not used - no content is being displayed.

1 - 4
(SPC charts)

""

Not used - chart window uses the default caption for the specified row.

300 - 304
(File, URL, or HTML code)

"text"

If you specify an empty string ("") for the caption, the chart window and the Interact menu will use the default caption for the specified row.

If a default caption is not available for this row of the template, or if you specify one or more spaces ("  ") for the caption, the chart window caption will be blank. Also, the Interact menu will show the type of chart – SPC, DMS or Dashboard – and the template row.

Return value

If the content_type parameter is 300 - 304 (File, URL, or HTML code) and the content parameter is blank, this command will return the number 0.

Otherwise, this command will return the number 1.

Notes

  Interacting with charts:

When the DE_CHART command displays an HTML file that was created by a CHT_DASH, CHT_DMS or CHT_SPC command, the user can launch an interactive version of the chart by clicking the Chart Options menu, pointing to Interact, and then clicking the name of the chart.

This will automatically open the same chart, dashboard or desktop in the appropriate GainSeeker module – SPC Charts and Reports, DMS Charts and Reports, or Enterprise Dashboard – where the user can make use of additional tools for analysis and reporting.

  Number and size of charts:

The number of chart windows that can be displayed at the same time is equal to the number of rows in the template. The size and arrangement of these chart windows is set on Template Wizard Step 3.

  Jumping to a bookmark in a web page:

If you use DE_CHART 301 to display a dynamic URL for one row of the template, and then later use DE_CHART 301 again for the same row to display a bookmarked section of that same HTML file, the chart window will jump to that bookmark without re-loading the HTML file.

In cases where you are dynamically changing the contents of the HTML file and trying to jump to a bookmark that did not exist the last time you used DE_CHART to display this file, you must first re-load the HTML file and pause long enough for the file to be re-loaded - or display a different HTML file - and then jump to the bookmark (example).

  E-mailing web pages:

When using the DE_CHART command to display an HTML file, a URL or a string of HTML code, you can still use the EMAIL command to send that information via e-mail. Also, the data entry operator can still click the File menu or Session menu and point to Send To to include the chart window in an e-mail. However, you should be aware of several important differences:

o   When e-mailing an HTML file or a string of HTML code, the program can attach or embed only the HTML file to the e-mail message. If this HTML file references any other files, including graphics like .gif or .jpg files, these other files will not be included in the e-mail.

One way to work around this issue is to ensure that any other files referenced by the HTML file or code exist in a shared location (such as a network drive), such that the file references in the HTML will work correctly when the e-mail recipient opens the attached or embedded HTML file. If you are using the CHT_DASH, CHT_DMS or CHT_SPC command to create the HTML file that is displayed in the chart window, you can configure the html_location= setting in Cms.ini to ensure that HTML files and the associated graphics files are created in a shared location.

Another option is to use the EMAIL command to attach or embed a graphics file that is referenced by the CHT_DASH, CHT_DMS or CHT_SPC command when that command saves the chart or report to HTML. This option works correctly even when no shared location is available, because the graphics file is embedded or attached to the e-mail message.

o   When the chart window is displaying an HTML file, a URL or a string of HTML code, the EMAIL command will attach a file to the e-mail message instead of embedding the file in the body of the e-mail – even when GainSeeker has been configured to embed files in the body of the e-mail message.

Examples

DE_CHART 4, 300, "Q:\Files\Diagram.jpg", "Instructional Diagram"

This formula changes the chart window for template row 4 to display the file "Q:\Files\Diagram.jpg" and sets the chart window heading to "Instructional Diagram".

DE_CHART 2, 300, (CHT_DASH 3, "Low Cpk"), ""

This formula changes the chart window for template row 2 to display the statistical filter dashboard named "Low Cpk" and uses the default chart window heading.

DE_CHART 1, 304, "Place piece in fixture <BR> with <B>part stamp facing operator.</B>", ""

This formula changes the chart window for template row 1 to display the following:

formula in cell [A1]:

DE_CHART 1, 301, "Q:\ Files\important.htm", ""

formulas in cells [B1] - [Y1]:

template formulas that add a "Section3" bookmark to Q:\Files\important.htm

formula in cell [Z1]:

DE_CHART 1, 301, "Q:\ Files\important.htm", "" :
DOZE
250 :
DE_CHART 1, 301, "Q:\Files\important.htm#Section3", ""

Cell [A1] first displays the "Q:\Files\important.htm" file in the chart window for template row 1.

In cell [Z1], the first DE_CHART command re-loads the updated file, pauses for 1/4 second, and then jumps to the "Section3" bookmark in the file.