<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ODS SGPLOT to create HTML ID tag for every chart element in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ODS-SGPLOT-to-create-HTML-ID-tag-for-every-chart-element/m-p/991790#M380378</link>
    <description>&lt;P&gt;We have a use case where we need to put an HTML ID tag on each element of a chart.&amp;nbsp; We do this with other SAS chart PROCs using GBARLINE, GCHART &amp;amp; GPLOT by inserting an HTML= option where the value of the HTML variable contains something like ID="xxxx".&amp;nbsp; Each and every element (point, bar, area) has it's own unique ID value.&amp;nbsp; We want the same ability with SGPLOT, but cannot find anywhere that this is possible.&amp;nbsp; We have tried the URL and TIP options, but these aren't meant to create an ID tag.&amp;nbsp; Here is an example of the SAS code (less the ODS HTML code and all of the non pertinent options) we use with GPLOT and the results it gives us:&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;...&lt;/DIV&gt;&lt;DIV&gt;DATA FINAL1;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SET FINAL;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FORMAT HTMLTXT $400.;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;HTMLTXT = 'TITLE="simple hover detail"&lt;/SPAN&gt;&lt;SPAN&gt;' ||&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;' ID="IDVAL' || COMPRESS(PUT(_N_,10.))|| '"';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;RUN;&lt;/DIV&gt;&lt;P&gt;...&lt;/P&gt;&lt;DIV&gt;PROC GPLOT DATA=FINAL1 ;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PLOT yvalue * xvalue = varname/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;HTML=HTMLTXT&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;RUN;&lt;/DIV&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One of the resulting lines of HTML code that is created should look like:&lt;/P&gt;&lt;P&gt;&amp;lt;area shape="RECT" TITLE="&lt;SPAN&gt;simple hover detail&lt;/SPAN&gt;" ID="IDVAL1234" coords="890,449,898,454"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I do this with SGPLOT?&lt;/P&gt;</description>
    <pubDate>Wed, 05 Aug 2026 16:06:30 GMT</pubDate>
    <dc:creator>kurtyboy</dc:creator>
    <dc:date>2026-08-05T16:06:30Z</dc:date>
    <item>
      <title>ODS SGPLOT to create HTML ID tag for every chart element</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-SGPLOT-to-create-HTML-ID-tag-for-every-chart-element/m-p/991790#M380378</link>
      <description>&lt;P&gt;We have a use case where we need to put an HTML ID tag on each element of a chart.&amp;nbsp; We do this with other SAS chart PROCs using GBARLINE, GCHART &amp;amp; GPLOT by inserting an HTML= option where the value of the HTML variable contains something like ID="xxxx".&amp;nbsp; Each and every element (point, bar, area) has it's own unique ID value.&amp;nbsp; We want the same ability with SGPLOT, but cannot find anywhere that this is possible.&amp;nbsp; We have tried the URL and TIP options, but these aren't meant to create an ID tag.&amp;nbsp; Here is an example of the SAS code (less the ODS HTML code and all of the non pertinent options) we use with GPLOT and the results it gives us:&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;...&lt;/DIV&gt;&lt;DIV&gt;DATA FINAL1;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SET FINAL;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FORMAT HTMLTXT $400.;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;HTMLTXT = 'TITLE="simple hover detail"&lt;/SPAN&gt;&lt;SPAN&gt;' ||&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;' ID="IDVAL' || COMPRESS(PUT(_N_,10.))|| '"';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;RUN;&lt;/DIV&gt;&lt;P&gt;...&lt;/P&gt;&lt;DIV&gt;PROC GPLOT DATA=FINAL1 ;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PLOT yvalue * xvalue = varname/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;HTML=HTMLTXT&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;RUN;&lt;/DIV&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One of the resulting lines of HTML code that is created should look like:&lt;/P&gt;&lt;P&gt;&amp;lt;area shape="RECT" TITLE="&lt;SPAN&gt;simple hover detail&lt;/SPAN&gt;" ID="IDVAL1234" coords="890,449,898,454"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I do this with SGPLOT?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2026 16:06:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-SGPLOT-to-create-HTML-ID-tag-for-every-chart-element/m-p/991790#M380378</guid>
      <dc:creator>kurtyboy</dc:creator>
      <dc:date>2026-08-05T16:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: ODS SGPLOT to create HTML ID tag for every chart element</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-SGPLOT-to-create-HTML-ID-tag-for-every-chart-element/m-p/991809#M380380</link>
      <description>You could simply overwrite HTML file generated by PROC SGPLOT to get ID tag.&lt;BR /&gt;It is very easy for SAS data step.</description>
      <pubDate>Thu, 06 Aug 2026 12:08:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-SGPLOT-to-create-HTML-ID-tag-for-every-chart-element/m-p/991809#M380380</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2026-08-06T12:08:26Z</dc:date>
    </item>
  </channel>
</rss>

