Html property: Chart class
Description
Use this property to retrieve the HTML string required to render the chart within an HTML area on the page. This is useful for rendering a chart on a page that does not have a Chart control but has an HTML area control, or for rendering charts on a tile that uses a content type of HTML area.
Use the CreateObject function, rather than the GetChart function, to instantiate the chart object when intending to use this property. You must call the SetData method and provide an instantiated and populated rowset. The property returns an empty string if the Chart object does not have any data set.
Note:
On a fluid page, the combination of the AspectRatio, Height, and Width properties is used to determine the dimensions of the chart rendered via the returned HTML. If you don't specify these properties, the chart's dimensions automatically fit within the containing element.
This property is read-only.
Example
Local Chart &oChart;
&oChart = CreateObject("Chart");
Local Rowset &rs = CreateRowset(Record.QE_CHART);
&rs.Fill();
&oChart.SetData(&rs);
&oChart.SetDataYAxis(QE_CHART.QE_VISITORS);
&oChart.SetDataXAxis(QE_CHART.QE_YEARS);
&oChart.SetDataSeries(QE_CHART.QE_PARKNAME);
&oChart.XAxisTitle = "Years";
&oChart.YAxisTitle = "No. of visitors";
&oChart.MainTitle = "National Parks Visitors";
&oChart.Height = 300;
&oChart.Width = 500;
rem set the HTML area control field value to Chart HTML;
QE_DYNCHART_WRK.QE_HTMLAREA = &oChart.Html;