Namespace: GlobFX.SwiffChartGenerator
Assembly: GlobFX.SwiffChartGenerator (in GlobFX.SwiffChartGenerator.dll)

Generates the chart in the requested format and returns the HTML tag as a string.

Visual Basic

    Public Function GetHTMLTag As String

C#

    public string GetHTMLTag();

#### Remarks

The method actually:

- generates the content (SVG, PNG, JPG, SWF or PDF data) from the chart object
- writes it as a file into the public cache
- returns an HTML tag (as a string) referencing generated the file

The format of the generated content can be specified by the OutputFormat property.

#### Return Value

- For a SVG image (SVG) the method returns a string like this one:

      <OBJECT type="image/svg+xml"
              data="/charts_cache/9A7DE3D6-CE1E412B.svg"
              width="300"
              height="200">
      </OBJECT>

- For a JPEG or PNG image (JPG or PNG) the method returns a string like this one:

      <IMG src="/charts_cache/9A7DE3D6-CE1E412B.jpg" width="300" height="200">

- For an Adobe Flash movie (SWF) the method returns a string like this one:

      <OBJECT width=300
              height=200
              classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000"
              codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0">
              <param name=movie value="/charts_cache/9A7DE3D6-CE1E412B.swf">
              <param name=quality value=high>
        <EMBED src="/charts_cache/9A7DE3D6-CE1E412B.swf"
               width=300
               height=200
               quality=high
               pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
               type="application/x-shockwave-flash">
        </EMBED>
      </OBJECT>

  This Flash object will need the Flash 4 Player or higher on the client browser. If Flash compression is enabled, the Flash object will automatically requires the Flash 6 Player or higher.

  This HTML tag is compatible with Microsoft Internet Explorer, Firefox and Opera browsers.

- For an Acrobat PDF document (PDF) the method returns a string like this one:

      <OBJECT type="application/pdf"
              data="/charts_cache/9A7DE3D6-CE1E412B.pdf"
              width="300"
              height="200"
      </OBJECT>

#### Sample Code

The following code illustrates use of the GetHTMLTag method.

Visual Basic

    ' Create the chart series
    chart.SetDataFromTxtFile("C:\\myData.txt")
    chart.LoadStyle("C:\\myStyle.scs")

    ' Generate the chart and print the HTML tag referencing it
    this.Response.Write( chart.GetHTMLTag() )

C#

    // Create the chart series
    chart.SetDataFromTxtFile("C:\\myData.txt");
    chart.LoadStyle("C:\\myStyle.scs");

    // Generate the chart and print the HTML tag referencing it
    Me.Response.Write( chart.GetHTMLTag() );

#### See Also

OutputFormat Property | GetOutputLocation Method | SetCacheName Method | SetPrivateCacheDir Method | SetMaxCacheSize Method | ClearCache Method | UseCache Method

Applies To: Chart Object