LassoScript Utility
Basics Browse Detail

[ChartFX_Serve]

Tag Link [ChartFX_Serve] Category ChartFX
Type Process Source Available Yes
Support Preferred Version 8.5
Change Unchanged Data Source Any
Output Type None Security None
Implementation LDML Sets Lasso 8.5

Description

[ChartFX_Serve] accepts a [ChartFX] chart as a parameter and serves the generated PNG file in place of the current page. Optional parameters include -File to specify the name of the downloaded file and -Type which defaults to image/png. If -Inline is specified then the image will be served inline in the current respond rather than as an attachment.

None of the contents of the current format file will be served. [ChartFX_Serve] completely rewrites the HTTP headers and contents of the served response. [ChartFX_Serve] also performs an [Abort] so no tags after [ChartFX_Serve] will be executed.

Syntax

[ChartFX_Serve: $myChart]

[ChartFX_Serve: $myChart->Data]

[ChartFX_Serve: $myChart, -File='SalesChart.png]

Parameters

Required Parameters
Chart Data The chart to be served. This parameter should be passed either a [ChartFX] object or the output from the [ChartFX->Data] tag.
Optional Parameters
-Type The MIME type for the served chart. Defaults to image/png.
-Inline If specified then the chart will be served for display within the browser. Otherwise, the chart will be served for download. Note when called through an HTML img tag the chart will always be displayed inline.
-File An option name for the image file. Defaults to the name of the current Lasso page with .png appended.

Change Notes

This tag was added in Lasso 8.5.2.

Examples

See the Lasso 8 Language Guide for examples of how to use this tag.