<?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 [Chart] Bar Chart Configuring Questions (Fonts and Formats) in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Chart-Bar-Chart-Configuring-Questions-Fonts-and-Formats/m-p/654599#M53841</link>
    <description>&lt;P&gt;I have defined stacked bar chart in my &lt;U&gt;&lt;STRONG&gt;Splunk Enterprise Dashboard&lt;/STRONG&gt;&lt;/U&gt;. I've been trying to solve this problem but I cannot solve them.. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; Please help me out.&lt;/P&gt;&lt;P&gt;These are the problems that I encountered:&lt;/P&gt;&lt;P&gt;1. As you can see in the line below `&lt;FONT color="#339966"&gt;| eval&amp;nbsp;&lt;SPAN&gt;PERCENTAGE =&amp;nbsp;round(PERCENTAGE, 1)&lt;/SPAN&gt;&lt;/FONT&gt;` I've rounded the data.&lt;BR /&gt;However, with data such as 7 and 10, ".0" gets dropped off for some reason. Our client strongly wants the data to be labelled in&amp;nbsp;&lt;SPAN&gt;a uniform format. Is there a way to force&amp;nbsp;natural number to appear as a integer form?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;* 7 &amp;amp;10 (AS-IS) -&amp;gt; 7.0 &amp;amp; 10.0 (TO-BE)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;2. Since the color of the Bar is Dark, I wanted to change the label in the bar to be White. I've wrote this line of code : `&lt;FONT color="#339966"&gt;&amp;lt;option name="charting.fontColor"&amp;gt;#ffffff&amp;lt;/option&amp;gt;&lt;/FONT&gt;` However, this makes the whole font color including the ones in the axes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. I&amp;nbsp; also want to change the label in the bar to be "&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Bold&lt;/STRONG&gt;&lt;/FONT&gt;" and "&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Times New Roman&lt;/STRONG&gt;&lt;/FONT&gt;" font-family. Is there a way to specify them?&lt;/P&gt;&lt;P&gt;This is my current code:&lt;/P&gt;&lt;P&gt;```XML&lt;/P&gt;&lt;P&gt;&amp;lt;row&amp;gt;&lt;BR /&gt;&amp;lt;panel&amp;gt;&lt;BR /&gt;&amp;lt;chart&amp;gt;&lt;BR /&gt;&amp;lt;search&amp;gt;&lt;BR /&gt;&amp;lt;query&amp;gt;&lt;BR /&gt;index = ~ (TRIMMED OF DUE TO PRIVACY ISSUE)&lt;BR /&gt;| eval&amp;nbsp;&lt;SPAN&gt;PERCENTAGE =&amp;nbsp;round(PERCENTAGE, 1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| fields DOMAIN MONTHS PERCENTAGE&lt;BR /&gt;&lt;/SPAN&gt;| chart values(&lt;SPAN&gt;PERCENTAGE&lt;/SPAN&gt;) over &lt;SPAN&gt;MONTHS &lt;/SPAN&gt;by &lt;SPAN&gt;DOMAIN &lt;/SPAN&gt;&lt;BR /&gt;&amp;lt;/query&amp;gt;&lt;BR /&gt;&amp;lt;earliest&amp;gt;earliest&amp;lt;/earliest&amp;gt;&lt;BR /&gt;&amp;lt;latest&amp;gt;latest&amp;lt;/latest&amp;gt;&lt;BR /&gt;&amp;lt;/search&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.axisLabelsX.majorLabelStyle.rotation"&amp;gt;0&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.axisTitleX.visibility"&amp;gt;collapsed&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.axisY.abbreviation"&amp;gt;none&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.axisY.scale"&amp;gt;linear&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.chart.showDataLabels"&amp;gt;all&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.chart.stackMode"&amp;gt;stacked&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.legend.placement"&amp;gt;right&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="height"&amp;gt;200&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;row&amp;gt;&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jasuchung_1-1692250139356.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/26828iED266206E78B82D7/image-size/large?v=v2&amp;amp;px=999" role="button" title="jasuchung_1-1692250139356.png" alt="jasuchung_1-1692250139356.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;jasuchung_1-1692250139356.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Thu, 17 Aug 2023 06:28:51 GMT</pubDate>
    <dc:creator>jasuchung</dc:creator>
    <dc:date>2023-08-17T06:28:51Z</dc:date>
    <item>
      <title>[Chart] Bar Chart Configuring Questions (Fonts and Formats)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Chart-Bar-Chart-Configuring-Questions-Fonts-and-Formats/m-p/654599#M53841</link>
      <description>&lt;P&gt;I have defined stacked bar chart in my &lt;U&gt;&lt;STRONG&gt;Splunk Enterprise Dashboard&lt;/STRONG&gt;&lt;/U&gt;. I've been trying to solve this problem but I cannot solve them.. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; Please help me out.&lt;/P&gt;&lt;P&gt;These are the problems that I encountered:&lt;/P&gt;&lt;P&gt;1. As you can see in the line below `&lt;FONT color="#339966"&gt;| eval&amp;nbsp;&lt;SPAN&gt;PERCENTAGE =&amp;nbsp;round(PERCENTAGE, 1)&lt;/SPAN&gt;&lt;/FONT&gt;` I've rounded the data.&lt;BR /&gt;However, with data such as 7 and 10, ".0" gets dropped off for some reason. Our client strongly wants the data to be labelled in&amp;nbsp;&lt;SPAN&gt;a uniform format. Is there a way to force&amp;nbsp;natural number to appear as a integer form?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;* 7 &amp;amp;10 (AS-IS) -&amp;gt; 7.0 &amp;amp; 10.0 (TO-BE)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;2. Since the color of the Bar is Dark, I wanted to change the label in the bar to be White. I've wrote this line of code : `&lt;FONT color="#339966"&gt;&amp;lt;option name="charting.fontColor"&amp;gt;#ffffff&amp;lt;/option&amp;gt;&lt;/FONT&gt;` However, this makes the whole font color including the ones in the axes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. I&amp;nbsp; also want to change the label in the bar to be "&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Bold&lt;/STRONG&gt;&lt;/FONT&gt;" and "&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Times New Roman&lt;/STRONG&gt;&lt;/FONT&gt;" font-family. Is there a way to specify them?&lt;/P&gt;&lt;P&gt;This is my current code:&lt;/P&gt;&lt;P&gt;```XML&lt;/P&gt;&lt;P&gt;&amp;lt;row&amp;gt;&lt;BR /&gt;&amp;lt;panel&amp;gt;&lt;BR /&gt;&amp;lt;chart&amp;gt;&lt;BR /&gt;&amp;lt;search&amp;gt;&lt;BR /&gt;&amp;lt;query&amp;gt;&lt;BR /&gt;index = ~ (TRIMMED OF DUE TO PRIVACY ISSUE)&lt;BR /&gt;| eval&amp;nbsp;&lt;SPAN&gt;PERCENTAGE =&amp;nbsp;round(PERCENTAGE, 1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| fields DOMAIN MONTHS PERCENTAGE&lt;BR /&gt;&lt;/SPAN&gt;| chart values(&lt;SPAN&gt;PERCENTAGE&lt;/SPAN&gt;) over &lt;SPAN&gt;MONTHS &lt;/SPAN&gt;by &lt;SPAN&gt;DOMAIN &lt;/SPAN&gt;&lt;BR /&gt;&amp;lt;/query&amp;gt;&lt;BR /&gt;&amp;lt;earliest&amp;gt;earliest&amp;lt;/earliest&amp;gt;&lt;BR /&gt;&amp;lt;latest&amp;gt;latest&amp;lt;/latest&amp;gt;&lt;BR /&gt;&amp;lt;/search&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.axisLabelsX.majorLabelStyle.rotation"&amp;gt;0&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.axisTitleX.visibility"&amp;gt;collapsed&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.axisY.abbreviation"&amp;gt;none&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.axisY.scale"&amp;gt;linear&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.chart.showDataLabels"&amp;gt;all&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.chart.stackMode"&amp;gt;stacked&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="charting.legend.placement"&amp;gt;right&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="height"&amp;gt;200&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;row&amp;gt;&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jasuchung_1-1692250139356.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/26828iED266206E78B82D7/image-size/large?v=v2&amp;amp;px=999" role="button" title="jasuchung_1-1692250139356.png" alt="jasuchung_1-1692250139356.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;jasuchung_1-1692250139356.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 06:28:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Chart-Bar-Chart-Configuring-Questions-Fonts-and-Formats/m-p/654599#M53841</guid>
      <dc:creator>jasuchung</dc:creator>
      <dc:date>2023-08-17T06:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: [Chart] Bar Chart Configuring Questions (Fonts and Formats)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Chart-Bar-Chart-Configuring-Questions-Fonts-and-Formats/m-p/654791#M53850</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have the same problem too. I hope there is a solution for it.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 05:08:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Chart-Bar-Chart-Configuring-Questions-Fonts-and-Formats/m-p/654791#M53850</guid>
      <dc:creator>MHC1</dc:creator>
      <dc:date>2023-08-18T05:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: [Chart] Bar Chart Configuring Questions (Fonts and Formats)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Chart-Bar-Chart-Configuring-Questions-Fonts-and-Formats/m-p/654817#M53851</link>
      <description>&lt;P&gt;I don't think anything can be done about 1 as there isn't an option on column charts to specify the precision.&lt;/P&gt;&lt;P&gt;For 2 and 3, you can use CSS - give you chart panel an id e.g. boldtimes&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  &amp;lt;row&amp;gt;
    &amp;lt;panel depends="$alwaysHide$"&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;style&amp;gt;
          #boldtimes .highcharts-data-label text {
            font-weight: bold !important;
            font-family: "Times New Roman";
            fill: white !important;
          }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel id="boldtimes"&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 18 Aug 2023 08:25:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Chart-Bar-Chart-Configuring-Questions-Fonts-and-Formats/m-p/654817#M53851</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-08-18T08:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: [Chart] Bar Chart Configuring Questions (Fonts and Formats)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Chart-Bar-Chart-Configuring-Questions-Fonts-and-Formats/m-p/654983#M53854</link>
      <description>&lt;P&gt;Thank u &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Wish there was a way to make it in to a text just for labeling data &lt;span class="lia-unicode-emoji" title=":crying_cat_face:"&gt;😿&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 01:47:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Chart-Bar-Chart-Configuring-Questions-Fonts-and-Formats/m-p/654983#M53854</guid>
      <dc:creator>jasuchung</dc:creator>
      <dc:date>2023-08-21T01:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: [Chart] Bar Chart Configuring Questions (Fonts and Formats)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Chart-Bar-Chart-Configuring-Questions-Fonts-and-Formats/m-p/655315#M53904</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/259743"&gt;@jasuchung&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;A workaround for issue 1 could be adding a javascript extension to your simpleXML dashboard (see docs at&amp;nbsp;&lt;A href="https://dev.splunk.com/enterprise/docs/developapps/visualizedata/usewebframework/modifydashboards/_" target="_blank" rel="noopener"&gt;https://dev.splunk.com/enterprise/docs/developapps/visualizedata/usewebframework/modifydashboards/&lt;/A&gt;). Script below, based on &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;example, will add one decimal to all data values displayed in chart without it (e.g. 10 -&amp;gt; 10.0)&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require([
  'jquery',
  'splunkjs/mvc',
  'splunkjs/mvc/simplexml/ready!'
], function ($, mvc) {

    pollAvailability = () =&amp;gt; {
        if (mvc.Components.hasInstance("boldtimes")) {
            // Chart loaded
            let content = $("#boldtimes g.highcharts-label.highcharts-data-label.highcharts-data-label-color-undefined tspan:not(:contains(.)):first-child");
            // Add the decimal to data values without it
            for (let i = 0; i &amp;lt; content.length; ++i) {
                let text = content[i].firstChild.textContent;
                text += ".0";
                content[i].firstChild.textContent = text;
            };

        } else {
            // Chart not loaded yet, retry in 200ms
            setTimeout(pollAvailability, 200);
        }
    };
    
    setTimeout(pollAvailability, 600);
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 12:02:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Chart-Bar-Chart-Configuring-Questions-Fonts-and-Formats/m-p/655315#M53904</guid>
      <dc:creator>epescio_splunk</dc:creator>
      <dc:date>2023-08-23T12:02:28Z</dc:date>
    </item>
  </channel>
</rss>

