Generates the chart in the requested format and returns the relative url location of the generated cache file as a string.

    String object.GetOutputLocation( )

#### Arguments

object
  Required. A Chart object.

#### Return Value

The string that specifies the relative url location of the generated chart in the public cache.

#### 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 a the relative url pointing to the generated file in the public cache

The format of the generated content can be specified by the method SetOutputFormat.

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

      "/charts_cache/9A7DE3D6-CE1E412B.svg"

For a JPEG image file (JPG) the method returns a string like this one:

      "/charts_cache/9A7DE3D6-CE1E412B.jpg"

For a PNG image file (PNG) the method returns a string like this one:

      "/charts_cache/9A7DE3D6-CE1E412B.png"

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

      "/charts_cache/9A7DE3D6-CE1E412B.swf"

For a PDF document file (PDF) the method returns a string like this one:

      "/charts_cache/9A7DE3D6-CE1E412B.pdf"

#### JSP Sample Code

The following JSP code illustrates use of the GetOutputLocation method.

    <%@ page import="com.globfx.swiffchart.SwiffChart" %>
    <%
      String installation_dir= "C:\\Program Files\\GlobFX\\Swiff Chart Generator 4";
      String web_root= "C:\\tomcat\\webapps\\ROOT";

      // Create a new Swiff Chart object
      SwiffChart chart= new SwiffChart(installation_dir);
      chart.SetServletInfo(request,response);
      chart.SetDocumentRoot(web_root);

      chart.SetCategoriesFromString("Q1;Q2;Q3;Q4");
      chart.SetSeriesValuesFromString(0, "12;11;6;9");

      chart.LoadStyle("C:\\myStyle.scs");

      chart.SetWidth( 400 );
      chart.SetHeight( 200 );

      // We can now generate the chart as a JPEG image
      chart.SetOutputFormat( "JPG" );
    %>

    Here is the chart rendered as an image:<br>
    <img src="<% out.println( chart.GetOutputLocation()); %>" width=400 height=200>

#### See Also

SetOutputFormat Method | GetHTMLTag Method | SetCacheName Method | SetPrivateCacheDir Method | SetMaxCacheSize Method | ClearCache Method | UseCache Method

Applies To: Chart Object