<?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 delete a rendered SplunkJS view? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-delete-a-rendered-SplunkJS-view/m-p/268639#M16993</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have (for example) a &lt;CODE&gt;ChartView&lt;/CODE&gt; created with &lt;CODE&gt;const v = new ChartView({}).render();&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;How can I delete/un-render &lt;CODE&gt;v&lt;/CODE&gt;?&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;</description>
    <pubDate>Thu, 08 Dec 2016 11:52:48 GMT</pubDate>
    <dc:creator>bhawkins1</dc:creator>
    <dc:date>2016-12-08T11:52:48Z</dc:date>
    <item>
      <title>How to delete a rendered SplunkJS view?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-delete-a-rendered-SplunkJS-view/m-p/268639#M16993</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have (for example) a &lt;CODE&gt;ChartView&lt;/CODE&gt; created with &lt;CODE&gt;const v = new ChartView({}).render();&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;How can I delete/un-render &lt;CODE&gt;v&lt;/CODE&gt;?&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2016 11:52:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-delete-a-rendered-SplunkJS-view/m-p/268639#M16993</guid>
      <dc:creator>bhawkins1</dc:creator>
      <dc:date>2016-12-08T11:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a rendered SplunkJS view?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-delete-a-rendered-SplunkJS-view/m-p/268640#M16994</link>
      <description>&lt;P&gt;try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunkjs.mvc.Components.getInstance(id).remove();
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;where id is the object (eg. panel-id), you want to remove ...&lt;/P&gt;

&lt;P&gt;example: &lt;CODE&gt;splunkjs.mvc.Components.getInstance("element1").remove();&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 13:26:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-delete-a-rendered-SplunkJS-view/m-p/268640#M16994</guid>
      <dc:creator>Rocket66</dc:creator>
      <dc:date>2017-02-02T13:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a rendered SplunkJS view?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-delete-a-rendered-SplunkJS-view/m-p/268641#M16995</link>
      <description>&lt;P&gt;The remove function works fine. Can i recreate the chartview object that can be viewed upon creating it again with the same id:&lt;/P&gt;

&lt;P&gt;require([&lt;BR /&gt;
"splunkjs/mvc/tableview",&lt;BR /&gt;
"splunkjs/mvc/chartview",&lt;BR /&gt;
"splunkjs/mvc/searchmanager",&lt;BR /&gt;
"splunkjs/mvc",&lt;BR /&gt;
"splunkjs/mvc/postprocessmanager",&lt;BR /&gt;
"splunkjs/mvc/dropdownview",&lt;BR /&gt;
"splunkjs/mvc/multidropdownview",,&lt;BR /&gt;
"splunkjs/mvc/textinputview",&lt;BR /&gt;
"underscore",&lt;BR /&gt;
"splunkjs/mvc/simplexml/ready!"&lt;BR /&gt;
], function(&lt;BR /&gt;
TableView,&lt;BR /&gt;
ChartView,&lt;BR /&gt;
SearchManager,&lt;BR /&gt;
mvc,&lt;BR /&gt;
PostProcessManager,&lt;BR /&gt;
DropdownView,&lt;BR /&gt;
MultiDropdownView,&lt;BR /&gt;
TextInputView,&lt;BR /&gt;
_&lt;BR /&gt;
) {var chart = new ChartView ({&lt;BR /&gt;
id: “element1”,&lt;BR /&gt;
managerid: “managerid”,&lt;BR /&gt;
wrap: true,&lt;BR /&gt;
rowNumbers: false, &lt;BR /&gt;
el: $("#elname")&lt;BR /&gt;
}, {tokens: true}).render();})&lt;/P&gt;

&lt;P&gt;When I try to recreate the ChartView component object on remove(), I am unable to view the chart on the Dashboard.&lt;BR /&gt;
The above command ensures that the object is once again created and rendered. &lt;BR /&gt;
Can you please suggest a way to recreate the removed Component that cab be viewed on the Dashboard&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 19:41:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-delete-a-rendered-SplunkJS-view/m-p/268641#M16995</guid>
      <dc:creator>kalyangoutham</dc:creator>
      <dc:date>2017-11-13T19:41:31Z</dc:date>
    </item>
  </channel>
</rss>

