<?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 bar chart: multiple colors for segment labels in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/bar-chart-multiple-colors-for-segment-labels/m-p/935861#M24801</link>
    <description>&lt;P&gt;In the presented Grotta barcharts, the same text color is applied to all segments.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/How-to-automate-connecting-segment-vertices-for-Grotta-chart/td-p/879280" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Programming/How-to-automate-connecting-segment-vertices-for-Grotta-chart/td-p/879280&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Is it possible to apply different text colors to different segments (eg. white for dark backgrounds and black for other backgrounds) with proc sgplot simply or must proc template/sgrender be used?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With proc sgplot, I only see the text statement (but needs lots of data preparation for it) and annotations as possible solution. Correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;seglabelattrs(color=) does not allow multiple colors&lt;/LI&gt;
&lt;LI&gt;textcolor from a dattrmap table is not working with datalabel/seglabel&lt;/LI&gt;
&lt;LI&gt;styleattrs statement: does not offer this feature.&lt;/LI&gt;
&lt;LI&gt;proc template: class GraphDataText apply the same color to all segements&lt;/LI&gt;
&lt;LI&gt;axistable would not be usable to add values in that case&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jul 2024 20:28:29 GMT</pubDate>
    <dc:creator>xxformat_com</dc:creator>
    <dc:date>2024-07-15T20:28:29Z</dc:date>
    <item>
      <title>bar chart: multiple colors for segment labels</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/bar-chart-multiple-colors-for-segment-labels/m-p/935861#M24801</link>
      <description>&lt;P&gt;In the presented Grotta barcharts, the same text color is applied to all segments.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/How-to-automate-connecting-segment-vertices-for-Grotta-chart/td-p/879280" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Programming/How-to-automate-connecting-segment-vertices-for-Grotta-chart/td-p/879280&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Is it possible to apply different text colors to different segments (eg. white for dark backgrounds and black for other backgrounds) with proc sgplot simply or must proc template/sgrender be used?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With proc sgplot, I only see the text statement (but needs lots of data preparation for it) and annotations as possible solution. Correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;seglabelattrs(color=) does not allow multiple colors&lt;/LI&gt;
&lt;LI&gt;textcolor from a dattrmap table is not working with datalabel/seglabel&lt;/LI&gt;
&lt;LI&gt;styleattrs statement: does not offer this feature.&lt;/LI&gt;
&lt;LI&gt;proc template: class GraphDataText apply the same color to all segements&lt;/LI&gt;
&lt;LI&gt;axistable would not be usable to add values in that case&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2024 20:28:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/bar-chart-multiple-colors-for-segment-labels/m-p/935861#M24801</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2024-07-15T20:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: bar chart: multiple colors for segment labels</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/bar-chart-multiple-colors-for-segment-labels/m-p/935875#M24802</link>
      <description>&lt;P&gt;It does not look like so hard I think .Just prepare the data and using TEXT statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=sashelp.heart noprint;
table status*bp_status/out=temp outpct;
run;
data want;
 set temp;
 by status;
 if first.status then cum_pct=0;
 pct=PCT_ROW*0.01;
 cum_pct+pct;
 x=cum_pct-pct/2;
 format cum_pct pct x percent8.2;
run;
proc sgplot data=want;
styleattrs datacontrastcolors=(black white navy);
hbarparm category=status response=pct/group=bp_status nooutline;
text x=x y=status text=pct/strip contributeoffset=none group=bp_status textattrs=(size=14);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1721092120018.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98423iE8146DB9F947DD29/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1721092120018.png" alt="Ksharp_0-1721092120018.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 01:08:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/bar-chart-multiple-colors-for-segment-labels/m-p/935875#M24802</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-07-16T01:08:49Z</dc:date>
    </item>
  </channel>
</rss>

