<?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 Re: How to set properties in a custom visualization in Javascript? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-properties-in-a-custom-visualization-in-Javascript/m-p/200985#M12626</link>
    <description>&lt;P&gt;You might check out the answer here: &lt;A href="https://answers.splunk.com/answers/500008/how-to-add-custom-option-to-a-panel.html"&gt;https://answers.splunk.com/answers/500008/how-to-add-custom-option-to-a-panel.html&lt;/A&gt;&lt;BR /&gt;
The main point being: custom app's custom options are not working anymore like they did before. So you might need some workarounds.&lt;BR /&gt;
I hope it helps somewhat.&lt;/P&gt;</description>
    <pubDate>Tue, 04 Apr 2017 13:20:25 GMT</pubDate>
    <dc:creator>zeinstein</dc:creator>
    <dc:date>2017-04-04T13:20:25Z</dc:date>
    <item>
      <title>How to set properties in a custom visualization in Javascript?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-properties-in-a-custom-visualization-in-Javascript/m-p/200984#M12625</link>
      <description>&lt;P&gt;Trying to use sample code from &lt;A href="http://dev.splunk.com/view/webframework-developapps/SP-CAAAESD"&gt;http://dev.splunk.com/view/webframework-developapps/SP-CAAAESD&lt;/A&gt; to set these properties in a custom visualization:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      &amp;lt;viz type="leaflet_maps_app.leaflet_maps" id="clusterMapId"&amp;gt;
....
           &amp;lt;option name="leaflet_maps_app.leaflet_maps.mapCenterLat"&amp;gt;46.0&amp;lt;/option&amp;gt;
            &amp;lt;option name="leaflet_maps_app.leaflet_maps.mapCenterLon"&amp;gt;120.0&amp;lt;/option&amp;gt;
            &amp;lt;option name="leaflet_maps_app.leaflet_maps.mapCenterZoom"&amp;gt;6&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With this javascript and not working:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    "splunkjs/mvc",
    "splunkjs/mvc/simplexml/ready!"
], function(mvc) {


    // Get the Events table
    var myClusterMap = mvc.Components.get('clusterMapId');

    // Programmatically change a property in the Events table
    myClusterMap.getVisualization(function(eventsView) {
        eventsView.settings.set("leaflet_maps_app.leaflet_maps.mapCenterLon", "-120");
    });     
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Dec 2016 19:51:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-properties-in-a-custom-visualization-in-Javascript/m-p/200984#M12625</guid>
      <dc:creator>simpkins1958</dc:creator>
      <dc:date>2016-12-16T19:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to set properties in a custom visualization in Javascript?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-properties-in-a-custom-visualization-in-Javascript/m-p/200985#M12626</link>
      <description>&lt;P&gt;You might check out the answer here: &lt;A href="https://answers.splunk.com/answers/500008/how-to-add-custom-option-to-a-panel.html"&gt;https://answers.splunk.com/answers/500008/how-to-add-custom-option-to-a-panel.html&lt;/A&gt;&lt;BR /&gt;
The main point being: custom app's custom options are not working anymore like they did before. So you might need some workarounds.&lt;BR /&gt;
I hope it helps somewhat.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 13:20:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-set-properties-in-a-custom-visualization-in-Javascript/m-p/200985#M12626</guid>
      <dc:creator>zeinstein</dc:creator>
      <dc:date>2017-04-04T13:20:25Z</dc:date>
    </item>
  </channel>
</rss>

