<?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 How to change  the Y-axis label on a chart overlay? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390762#M113756</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5216i12812C25B74E50CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I have this chart the Y-axis on the right should display time. I added :00 using the JavaScript code below.&lt;/P&gt;

&lt;P&gt;Problem is the label is being cut off and should not be implemented on the Y-axis on the left.&lt;/P&gt;

&lt;P&gt;Is there a way to add the :00 to Y-axis on the right only and not be cut off from the screen.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
     "jquery",
     "splunkjs/mvc",
     "splunkjs/mvc/simplexml/ready!"
 ], function($,mvc){

     mvc.Components.get("myHighChart").getVisualization(function(chartView) {
         chartView.on("rendered", function() {
                 $("#myHighChart g.highcharts-data-label text:not(:contains(%)) tspan").after(" %");
                 $("#myHighChart g.highcharts-yaxis-labels text:not(:contains(%)) tspan").after(" %");
         });
     });
 });
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 21 Jun 2018 03:06:43 GMT</pubDate>
    <dc:creator>michaelrosello</dc:creator>
    <dc:date>2018-06-21T03:06:43Z</dc:date>
    <item>
      <title>How to change  the Y-axis label on a chart overlay?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390762#M113756</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5216i12812C25B74E50CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I have this chart the Y-axis on the right should display time. I added :00 using the JavaScript code below.&lt;/P&gt;

&lt;P&gt;Problem is the label is being cut off and should not be implemented on the Y-axis on the left.&lt;/P&gt;

&lt;P&gt;Is there a way to add the :00 to Y-axis on the right only and not be cut off from the screen.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
     "jquery",
     "splunkjs/mvc",
     "splunkjs/mvc/simplexml/ready!"
 ], function($,mvc){

     mvc.Components.get("myHighChart").getVisualization(function(chartView) {
         chartView.on("rendered", function() {
                 $("#myHighChart g.highcharts-data-label text:not(:contains(%)) tspan").after(" %");
                 $("#myHighChart g.highcharts-yaxis-labels text:not(:contains(%)) tspan").after(" %");
         });
     });
 });
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jun 2018 03:06:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390762#M113756</guid>
      <dc:creator>michaelrosello</dc:creator>
      <dc:date>2018-06-21T03:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to change  the Y-axis label on a chart overlay?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390763#M113757</link>
      <description>&lt;P&gt;&lt;STRONG&gt;[Updated Answer]&lt;/STRONG&gt;  &lt;CODE&gt;transform: translate&lt;/CODE&gt; should be used instead of &lt;CODE&gt;transform: translateX&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;html depends="$alwaysHideCSSOverride$"&amp;gt;
     &amp;lt;style&amp;gt;
       #myHighChart g.highcharts-yaxis-labels:last-child text{
         transform: translate(-10,0) !important;
       }
     &amp;lt;/style&amp;gt;
   &amp;lt;/html&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;@michaelrosello, I think you have posted the code for Showing % in Data Label and Axis. &lt;A href="https://wiki.splunk.com/User_talk:Niketnilay#Topic_7:_Show_Percent_in_Stacked_Column_Chart_instead_of_Values_and_highlight_Data_Labels_as_White_color_through_CSS"&gt;https://wiki.splunk.com/User_talk:Niketnilay#Topic_7:_Show_Percent_in_Stacked_Column_Chart_instead_of_Values_and_highlight_Data_Labels_as_White_color_through_CSS&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;However, as per your screenshot, you need &lt;CODE&gt;:00&lt;/CODE&gt; to be suffixed to only chart's overlaid y axis. Following is the JS you need for the same (I have taken out dat-label as you are not using that):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    "jquery",
    "splunkjs/mvc",
    "splunkjs/mvc/simplexml/ready!"
], function ($, mvc) {

    mvc.Components.get("myHighChart").getVisualization(function (chartView) {
        chartView.on("rendered", function () {
            $("#myHighChart g.highcharts-yaxis-labels:last-child text:not(:contains(:00)) tspan").after(":00");
        });
    });
});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;:last-child&lt;/CODE&gt; has been added to the CSS Selector as there will be two y-axis with same CSS Selector. Where last element is for overlaid Y-axis.&lt;/P&gt;

&lt;P&gt;In order to shift the position of y-axis labels towards left you would need to use following CSS transform:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;html depends="$alwaysHideCSSOverride$"&amp;gt;
    &amp;lt;style&amp;gt;
      #myHighChart g.highcharts-yaxis-labels:last-child text{
        transform: translateX(-10px);
      }
    &amp;lt;/style&amp;gt;
  &amp;lt;/html&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is a run anywhere example for the same:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5214i378AC1D76F62EEF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard script="highchart_axis_label_hour.js"&amp;gt;
  &amp;lt;label&amp;gt;Chart Overlay Show Hour&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html depends="$alwaysHideCSSOverride$"&amp;gt;
        &amp;lt;style&amp;gt;
          #myHighChart g.highcharts-yaxis-labels:last-child text{
            transform: translateX(-10px);
          }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
      &amp;lt;chart id="myHighChart"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype=splunkd log_level!=INFO
| timechart count max(date_hour) as hour by log_level&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.overflowMode"&amp;gt;ellipsisNone&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.rotation"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleX.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY2.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisX.abbreviation"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisX.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY.abbreviation"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.abbreviation"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.enabled"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.scale"&amp;gt;inherit&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.bubbleMaximumSize"&amp;gt;50&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.bubbleMinimumSize"&amp;gt;10&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.bubbleSizeBy"&amp;gt;area&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.nullValueMode"&amp;gt;gaps&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.overlayFields"&amp;gt;"hour: ERROR","hour: WARN"&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.showDataLabels"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.sliceCollapsingThreshold"&amp;gt;0.01&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.stackMode"&amp;gt;default&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.style"&amp;gt;shiny&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.layout.splitSeries"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.layout.splitSeries.allowIndependentYRanges"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.labelStyle.overflowMode"&amp;gt;ellipsisMiddle&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.mode"&amp;gt;standard&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.placement"&amp;gt;bottom&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.lineWidth"&amp;gt;2&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.enabled"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.scales.shared"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.size"&amp;gt;medium&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is the required JS File (&lt;CODE&gt;highchart_axis_label_hour.js&lt;/CODE&gt;) : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    "jquery",
    "splunkjs/mvc",
    "splunkjs/mvc/simplexml/ready!"
], function ($, mvc) {

    mvc.Components.get("myHighChart").getVisualization(function (chartView) {
        chartView.on("rendered", function () {
            $("#myHighChart g.highcharts-yaxis-labels:last-child text:not(:contains(:00)) tspan").after(":00");
        });
    });
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jun 2018 04:14:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390763#M113757</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-06-21T04:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to change  the Y-axis label on a chart overlay?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390764#M113758</link>
      <description>&lt;P&gt;It works now. But one problem though including in the original post.&lt;BR /&gt;
When I hover at the chart the label comes back to its original place which is cut off.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 06:17:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390764#M113758</guid>
      <dc:creator>michaelrosello</dc:creator>
      <dc:date>2018-06-21T06:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to change  the Y-axis label on a chart overlay?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390765#M113759</link>
      <description>&lt;P&gt;Try with &lt;CODE&gt;transform: translateX(-10px) !important;&lt;/CODE&gt;. If this does not work maybe it would need to be added through jQuery instead.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 06:28:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390765#M113759</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-06-21T06:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to change  the Y-axis label on a chart overlay?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390766#M113760</link>
      <description>&lt;P&gt;It still moves even with !important added.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 06:33:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390766#M113760</guid>
      <dc:creator>michaelrosello</dc:creator>
      <dc:date>2018-06-21T06:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to change  the Y-axis label on a chart overlay?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390767#M113761</link>
      <description>&lt;P&gt;Sorry my bad use &lt;CODE&gt;translate&lt;/CODE&gt; instead of translateX... I have updated my answer please try out. Since chart svg by default is using translate... the settings overridden by translateX are getting removed.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;html depends="$alwaysHideCSSOverride$"&amp;gt;
  &amp;lt;style&amp;gt;
    #myHighChart g.highcharts-yaxis-labels:last-child text{
      transform: translate(-10,0) !important;
    }
  &amp;lt;/style&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jun 2018 08:02:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390767#M113761</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-06-21T08:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to change  the Y-axis label on a chart overlay?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390768#M113762</link>
      <description>&lt;P&gt;It works now. Thanks&lt;/P&gt;

&lt;P&gt;sadly requirements has been changed and I have to change things up a little. What I'm trying now is also replace the value of pop up modal from the chart when you hover a value. Maybe you have a insight to this also?&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/666254/change-modal-value-of-chart.html?minQuestionBodyLength=80"&gt;https://answers.splunk.com/answers/666254/change-modal-value-of-chart.html?minQuestionBodyLength=80&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 11:43:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390768#M113762</guid>
      <dc:creator>michaelrosello</dc:creator>
      <dc:date>2018-06-21T11:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to change  the Y-axis label on a chart overlay?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390769#M113763</link>
      <description>&lt;P&gt;@michaelrosello do up vote the answer/comments that helped.&lt;/P&gt;

&lt;P&gt;Thanks for posting a separate question for changing the Tooltip text. I will have a look at that.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 12:00:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-Y-axis-label-on-a-chart-overlay/m-p/390769#M113763</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-06-21T12:00:22Z</dc:date>
    </item>
  </channel>
</rss>

