<?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 do I render a chart with an overlay using the &amp;quot;View as Axis&amp;quot; option using the splunk-sdk for javascript? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-render-a-chart-with-an-overlay-using-the-quot-View-as/m-p/204407#M12836</link>
    <description>&lt;P&gt;I'm trying to render a chart with an "View as Axis" overlay using the javascript splunk-sdk.  Setting the following options does not achieve the expected result:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;window.splunkjs.UI.ready(window.chartToken, function () {
  chart.setData(results, {
    ...
    "axisY2.enabled": true,
    "axisY2.scale": "inherit",
    "chart.overlayFields": "some-field-name"
  });
  chart.draw();
});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I also tried setting chart.overlayFields as an array &lt;CODE&gt;"chart.overlayFields": ["some-field-name"]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;What am I missing to make this happen?  I have all the options set as shown by looking at a chart definition XML in splunk itself.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Oct 2015 14:57:52 GMT</pubDate>
    <dc:creator>jmacgowan</dc:creator>
    <dc:date>2015-10-23T14:57:52Z</dc:date>
    <item>
      <title>How do I render a chart with an overlay using the "View as Axis" option using the splunk-sdk for javascript?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-render-a-chart-with-an-overlay-using-the-quot-View-as/m-p/204407#M12836</link>
      <description>&lt;P&gt;I'm trying to render a chart with an "View as Axis" overlay using the javascript splunk-sdk.  Setting the following options does not achieve the expected result:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;window.splunkjs.UI.ready(window.chartToken, function () {
  chart.setData(results, {
    ...
    "axisY2.enabled": true,
    "axisY2.scale": "inherit",
    "chart.overlayFields": "some-field-name"
  });
  chart.draw();
});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I also tried setting chart.overlayFields as an array &lt;CODE&gt;"chart.overlayFields": ["some-field-name"]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;What am I missing to make this happen?  I have all the options set as shown by looking at a chart definition XML in splunk itself.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2015 14:57:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-render-a-chart-with-an-overlay-using-the-quot-View-as/m-p/204407#M12836</guid>
      <dc:creator>jmacgowan</dc:creator>
      <dc:date>2015-10-23T14:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I render a chart with an overlay using the "View as Axis" option using the splunk-sdk for javascript?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-render-a-chart-with-an-overlay-using-the-quot-View-as/m-p/204408#M12837</link>
      <description>&lt;P&gt;Using the Javascript SDK here is how I do this.  &lt;CODE&gt;charting.&lt;/CODE&gt; seems to be missing&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;var saved_search_108 = new SavedSearchManager({
      id: 'saved_search_108',
      searchname: saved_search_lookup[get_object(object_id)]['search_108'][get_corrected_time(earliest_time_id)],
      cache: true,
      preview: true,
      earliest_time: get_corrected_time(earliest_time_id),
      latest_time:  get_corrected_time(latest_time_id),
      app: 'envision',
});

var chart_108 = new ChartView({
      id: 'chart_108',
      type: 'column',
      el:  $('#chart_108'),
      "charting.axisY2.enabled": true,
      "charting.chart.columnAlignment": .5,
      "charting.chart.overlayFields": "Total",
      "charting.legend.placement": "bottom",
      managerid: 'saved_search_108',
}).render();
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jul 2016 21:57:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-render-a-chart-with-an-overlay-using-the-quot-View-as/m-p/204408#M12837</guid>
      <dc:creator>sklass</dc:creator>
      <dc:date>2016-07-27T21:57:47Z</dc:date>
    </item>
  </channel>
</rss>

