<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Disable an amChart series upon load]]></title><description><![CDATA[<p dir="auto">I have a graph with two series loaded onto it; the information is relevant to one another, but the data is a bit disparate - I'd like to start the graph with one of the series disabled, but allowed to be enabled, so the user can turn it on if they want to see it; is there any way to do this?</p>
<p dir="auto">I've tried <code>series-2-details="false"</code> and <code>series-2-disabled="true"</code> with no success ... and I can't see any details in the documents at <a href="https://docs.amcharts.com/3/javascriptcharts/AmGraph" rel="nofollow ugc">https://docs.amcharts.com/3/javascriptcharts/AmGraph</a> to see how to do this?</p>
<p dir="auto">Thanks</p>
<p dir="auto">Richard</p>
]]></description><link>https://forum.mango-os.com/topic/4196/disable-an-amchart-series-upon-load</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 01:20:57 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/4196.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 08 May 2019 07:28:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Disable an amChart series upon load on Thu, 13 Jun 2019 03:01:53 GMT]]></title><description><![CDATA[<p dir="auto">@richard-mortimer said in <a href="/post/22140">Disable an amChart series upon load</a>:</p>
<blockquote>
<p dir="auto">I was asked to remove one of the series plot from the graph</p>
</blockquote>
<p dir="auto">I was asked to add them back, so glad I asked the question, now it's fixed!!</p>
<p dir="auto">Cheers</p>
<p dir="auto">Richard</p>
]]></description><link>https://forum.mango-os.com/post/22414</link><guid isPermaLink="true">https://forum.mango-os.com/post/22414</guid><dc:creator><![CDATA[richard.mortimer]]></dc:creator><pubDate>Thu, 13 Jun 2019 03:01:53 GMT</pubDate></item><item><title><![CDATA[Reply to Disable an amChart series upon load on Wed, 15 May 2019 04:21:56 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the responses - I was reading through them this morning, and hoping to try them out today, but at our early meeting I was asked to remove one of the series plot from the graph, so I hope this information helps someone in the future.</p>
<p dir="auto">Cheers</p>
<p dir="auto">Richard</p>
]]></description><link>https://forum.mango-os.com/post/22140</link><guid isPermaLink="true">https://forum.mango-os.com/post/22140</guid><dc:creator><![CDATA[richard.mortimer]]></dc:creator><pubDate>Wed, 15 May 2019 04:21:56 GMT</pubDate></item><item><title><![CDATA[Reply to Disable an amChart series upon load on Tue, 14 May 2019 16:46:49 GMT]]></title><description><![CDATA[<p dir="auto">@richard-mortimer Here's an example that sets the default so that the graphs are hidden and then sets the 2nd graph to be shown.</p>
<pre><code>&lt;ma-watch-list-get ng-model="designer.watchList" parameters="designer.parameters" on-points-change="designer.points = $points" id="ff8f56f8-0074-4f46-95a9-e789cda9836a" watch-list-xid="WL_ed918c86-646f-4760-b5af-d9285ff86505"&gt;&lt;/ma-watch-list-get&gt;
&lt;div class="ma-designer-root" id="70fe9bc9-0fba-4311-8d0d-51ca93706697" style="width: 1366px; height: 768px; position: relative;"&gt;
    &lt;ma-point-values id="49e1ff96-2f4f-44bc-bfc1-97dc87b4a4cc" points="designer.points" from="dateBar.from" to="dateBar.to" rollup="{{dateBar.rollupType}}" rollup-interval="{{dateBar.rollupIntervals + ' ' + dateBar.rollupIntervalPeriod}}" style="position: absolute; left: 148px; top: 124px;" values="pvs"&gt;&lt;/ma-point-values&gt;
    &lt;ma-serial-chart id="2e8f4165-aeae-4555-90e0-efec6d3bd1a2" style="position: absolute; width: 1235px; height: 522px; left: 47px; top: 211px;" values="pvs" points="designer.points" legend="true" default-graph-options="{hidden: true}" graph-options="[null, {hidden: false}]"&gt;&lt;/ma-serial-chart&gt;
&lt;/div&gt;
</code></pre>
]]></description><link>https://forum.mango-os.com/post/22115</link><guid isPermaLink="true">https://forum.mango-os.com/post/22115</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Tue, 14 May 2019 16:46:49 GMT</pubDate></item><item><title><![CDATA[Reply to Disable an amChart series upon load on Tue, 14 May 2019 16:34:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/craigweb" aria-label="Profile: CraigWeb">@<bdi>CraigWeb</bdi></a> not sure what exactly you are responding to. <code>default-graph-options</code> takes a single object and sets the defaults if an option is not specified for a specific graph. The <code>graph-options</code> attribute does take an array and can be used to specify the graph options for a specific graph.</p>
]]></description><link>https://forum.mango-os.com/post/22114</link><guid isPermaLink="true">https://forum.mango-os.com/post/22114</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Tue, 14 May 2019 16:34:38 GMT</pubDate></item><item><title><![CDATA[Reply to Disable an amChart series upon load on Fri, 10 May 2019 10:47:12 GMT]]></title><description><![CDATA[<p dir="auto">@richard-mortimer</p>
<p dir="auto">I can see this being a common use case. Unfortunately, the <code>default-graph-options</code> works on all the graph series. It would be great if it took an array like the <code>graph-options</code> does as the <code>default-graph-options</code> doesn't  get used when the graph gets re-rendered only on-init.  Maybe Jared could agree to change to take an array.</p>
]]></description><link>https://forum.mango-os.com/post/22068</link><guid isPermaLink="true">https://forum.mango-os.com/post/22068</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Fri, 10 May 2019 10:47:12 GMT</pubDate></item><item><title><![CDATA[Reply to Disable an amChart series upon load on Fri, 10 May 2019 10:09:02 GMT]]></title><description><![CDATA[<p dir="auto">Right!</p>
<p dir="auto">Sorry I'm a bit late to the party work and life took over momentarily...<br />
I don't know enough about your interface or your points but I can show you this at least and work from here.<br />
My components are template based so i have some common elements to work from.</p>
<ol>
<li>This works based upon the series title in the chart, So i'm going under the assumption that your naming convention is generally consistent.</li>
<li>Rather than a full fledged component you could likely wrap the affected chart in an AngularJS controller and put this code in the controller:</li>
</ol>
<pre><code>/* Works based upon the title of the series on said chart axis. Toggles graph on chart */
$scope.toggleChart = function(titleTerm)
{
	try
	{
		var allCharts = AmCharts.charts;
		for (var i = 0; i &lt; allCharts.length; i++) {
			if(AmCharts.charts[ i ].graphs.length&gt;1)
			{			
				for(var graph=0; graph&lt;AmCharts.charts[ i ].graphs.length;graph++)
				{
					if (  AmCharts.charts[ i ].graphs[graph].hidden &amp;&amp; AmCharts.charts[ i ].graphs[graph].title.indexOf(titleTerm)&gt;-1 ){
					   AmCharts.charts[ i ].showGraph( AmCharts.charts[ i ].graphs[graph] );								  
					  break;
					}
					if ( AmCharts.charts[ i ].graphs[graph].title.indexOf(titleTerm)&gt;-1 ){
				AmCharts.charts[ i ].hideGraph( AmCharts.charts[ i ].graphs[graph] );	break;}
					
				}
			}
		}
	}
	catch(e){console.log(e);}
};
</code></pre>
<p dir="auto">Then, by using the event fired by the point values directive: <code>on-values-updated</code> you can call this function to toggle the chart to hide. Note this will also remove the axis from the view also.</p>
<p dir="auto">After an <code>ma-button/md-button</code> with the <code>ng-click</code> event can call the same function with the disparate point you speak of,<br />
Happy to expand if you require more information.</p>
]]></description><link>https://forum.mango-os.com/post/22064</link><guid isPermaLink="true">https://forum.mango-os.com/post/22064</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Fri, 10 May 2019 10:09:02 GMT</pubDate></item><item><title><![CDATA[Reply to Disable an amChart series upon load on Fri, 10 May 2019 07:24:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/craigweb" aria-label="Profile: craigweb">@<bdi>craigweb</bdi></a> said in <a href="/post/22058">Disable an amChart series upon load</a>:</p>
<blockquote>
<p dir="auto">At least it is a skill that is not unique to Mango, so well worth your time...</p>
</blockquote>
<p dir="auto">That's true - I'm not unfamiliar with the MVC concept, but just having problems where the 'C' sits within the Mango/AngularJS structure ... but slowly figuring it out ...</p>
]]></description><link>https://forum.mango-os.com/post/22059</link><guid isPermaLink="true">https://forum.mango-os.com/post/22059</guid><dc:creator><![CDATA[richard.mortimer]]></dc:creator><pubDate>Fri, 10 May 2019 07:24:49 GMT</pubDate></item><item><title><![CDATA[Reply to Disable an amChart series upon load on Fri, 10 May 2019 07:01:39 GMT]]></title><description><![CDATA[<p dir="auto">At least it is a skill that is not unique to Mango, so well worth your time...</p>
]]></description><link>https://forum.mango-os.com/post/22058</link><guid isPermaLink="true">https://forum.mango-os.com/post/22058</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Fri, 10 May 2019 07:01:39 GMT</pubDate></item><item><title><![CDATA[Reply to Disable an amChart series upon load on Fri, 10 May 2019 05:16:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mattfox" aria-label="Profile: mattfox">@<bdi>mattfox</bdi></a> said in <a href="/post/22053">Disable an amChart series upon load</a>:</p>
<blockquote>
<p dir="auto">Just looking at this thread, was just wondering Richard if you're actively writing angularJS scripts or just using what's available to you in the dashboard?</p>
<p dir="auto">Fox</p>
</blockquote>
<p dir="auto">I started out using the dashboard designer, but have gone beyond that a bit; starting to write some Angular, but really need to brush up on it (been a while since I used it), and some of the Mango directives ...</p>
<p dir="auto">Cheers</p>
<p dir="auto">Richard</p>
]]></description><link>https://forum.mango-os.com/post/22057</link><guid isPermaLink="true">https://forum.mango-os.com/post/22057</guid><dc:creator><![CDATA[richard.mortimer]]></dc:creator><pubDate>Fri, 10 May 2019 05:16:50 GMT</pubDate></item><item><title><![CDATA[Reply to Disable an amChart series upon load on Fri, 10 May 2019 01:30:15 GMT]]></title><description><![CDATA[<p dir="auto">Just looking at this thread, was just wondering Richard if you're actively writing angularJS scripts or just using what's available to you in the dashboard?</p>
<p dir="auto">Fox</p>
]]></description><link>https://forum.mango-os.com/post/22053</link><guid isPermaLink="true">https://forum.mango-os.com/post/22053</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Fri, 10 May 2019 01:30:15 GMT</pubDate></item><item><title><![CDATA[Reply to Disable an amChart series upon load on Thu, 09 May 2019 06:51:08 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for that - I'm glad you could see it in there, I looked again and still couldn't see it - and fortunately my graph is a historical one, so I've got it updating every 15 minutes; I might change it to one hour, which should give the user enough time to view the graph and digest the information beore it swaps back (I hope :) )</p>
<p dir="auto">Cheers</p>
<p dir="auto">Richard</p>
]]></description><link>https://forum.mango-os.com/post/22047</link><guid isPermaLink="true">https://forum.mango-os.com/post/22047</guid><dc:creator><![CDATA[richard.mortimer]]></dc:creator><pubDate>Thu, 09 May 2019 06:51:08 GMT</pubDate></item><item><title><![CDATA[Reply to Disable an amChart series upon load on Thu, 09 May 2019 06:30:09 GMT]]></title><description><![CDATA[<p dir="auto">Well, that code pen certainly saved me a lot of time <code>series-2-graph-options="{hidden: true}"</code> is what you looking for.<br />
If I am not mistaken you can put any property you see here  <a href="https://docs.amcharts.com/3/javascriptcharts/AmGraph" rel="nofollow ugc">https://docs.amcharts.com/3/javascriptcharts/AmGraph</a> in the options object.</p>
<p dir="auto">Edit:<br />
This seems to be a bit troublesome with a live updating chart.  As the chart gets re-rendered when the values update.  Setting it back to hidden.</p>
]]></description><link>https://forum.mango-os.com/post/22046</link><guid isPermaLink="true">https://forum.mango-os.com/post/22046</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Thu, 09 May 2019 06:30:09 GMT</pubDate></item><item><title><![CDATA[Reply to Disable an amChart series upon load on Thu, 09 May 2019 02:32:45 GMT]]></title><description><![CDATA[<p dir="auto">Cheers for that - I've already got that option enabled, so have seen the function you're describing, however it would be great to start up without that particular graph showing, and allow the user to add it on (this is graphing the state of charge of a battery and the power dissipated by the battery, so the SoC goes between 0 - 100%; whereas the power can be from 1000W to -1000W (charging and discharging).</p>
<p dir="auto">What would be ideal is to have only one value displayed on the graph; similar to this CodePen: <a href="https://codepen.io/team/amcharts/pen/dd327aedc074993d143826c1bc2044f0" rel="nofollow ugc">https://codepen.io/team/amcharts/pen/dd327aedc074993d143826c1bc2044f0</a> but I'd be happy with the second series just being turned off at the load of the graph ...</p>
<p dir="auto">Cheers</p>
<p dir="auto">Richard</p>
]]></description><link>https://forum.mango-os.com/post/22045</link><guid isPermaLink="true">https://forum.mango-os.com/post/22045</guid><dc:creator><![CDATA[richard.mortimer]]></dc:creator><pubDate>Thu, 09 May 2019 02:32:45 GMT</pubDate></item><item><title><![CDATA[Reply to Disable an amChart series upon load on Wed, 08 May 2019 08:05:57 GMT]]></title><description><![CDATA[<p dir="auto">Hi Richard</p>
<p dir="auto">For starters, you can use <code>legend="true"</code> which allow you to disable and enable the series.  I'll try to look into how to render the graph with a disabled series by default.  Would it still be necessary with the legend?</p>
]]></description><link>https://forum.mango-os.com/post/22043</link><guid isPermaLink="true">https://forum.mango-os.com/post/22043</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Wed, 08 May 2019 08:05:57 GMT</pubDate></item></channel></rss>