elambert

Members
  • Content count

    4
  • Joined

  • Last visited

About elambert

  • Rank
    Forum Newbie
  1. Good morning. I'm using json to render a live-update HLED chart. I have it all working well until the data value returned from the database happens to fall above (or below, as in -1 error state) the upperlimit set for the HLED widget. I would hope/expect that it would fill the HLED since, in this case, 18 > 12. However it draws the HLED with a zero value. In the case in question, the $led_end=12 and the data returned by the datastreamURL query is 18. Is there a way to have this behave as I would expect, where "since 18 > 12, assume 12 and fill chart"? Know what I mean? =) Here's a piece of the perl script I use to generate the JSON in question: ($name, $itemid, $label, $x, $y, $qtype, $units, $led_start, $led_warnlow, $led_warnhigh, $led_end, $environ) = split(/,/, $line); $chart = { manageresize => "1", origH => "120", origW => "310", basefont => "Cabin", basefontsize => 10, lowerlimit => "$led_start", upperlimit => "$led_end", showLimits => "1", bgcolor => "000000", bgalpha => "88", numbersuffix => "$units", majortmcolor => "646F8F", majortmheight => "9", majortmthickness => "1", majortmnumber => "6", minortmcolor => "646F8F", minortmheight => "3", minortmnumber => "3", tickvaluestep => "1", ticksbelowgauge => "0", decimalprecision => "1", forcedecimals => "0", palettethemecolor => "FFFFFF", charttopmargin => "30", chartbottommargin => "10", ledborderthickness => "1", ledgap => "2", ledsize => "3", decimals => "1", refreshInstantly => "1", clickURL => "j-renderChart-$name", dataStreamURL => "/perl/ops/garch-$release_env/getdata.pl?name=$name", refreshInterval => "20" }; $initial_value = { value => "$default_value"}; $annotation_items[0] = { color => "FFFFFF", type => "text", bold => "1", font => "Cabin", fontSize => "11", x => '$chartCenterX', y => '$chartStartY+15', label => "$label ($environ)" }; $groups[0] = { id => "Group1", items => \@annotation_items }; $annotation = { groups => \@groups }; $color[0] = { minvalue => "$led_start", maxvalue => "$led_warnlow", code => "00FF00" }; $color[1] = { minvalue => "$led_warnlow", maxvalue => "$led_warnhigh", code => "FFFF00" }; $color[2] = { minvalue => "$led_warnhigh", maxvalue => "$led_end", code => "FF0000" }; $colorrange = { color => \@color }; $list = { chart => $chart, value => $initial_value, annotations => $annotation, colorrange => $colorrange }; $json_text = encode_json $list; print header('application/json'); print $json_text;
  2. Ie8/9 Freeze, Chrome Ok

    Good morning. I have a page comprised of FusionCharts/FusionWidgets and ExtJS. The page renders and operates without error in Chrome. However, in IE8 or IE9 (only versions of IE I have access to test on), it renders well at first, but as soon as I try to interact with the page to switch active tabs in an extjs tabpanel comprised of multiple horizontal LED FusionCharts graphs, it freezes completely. I may try to cross-post to the ExtJS forums as well. Here's a bit of the relevant code: function renderTAB(tabid) { switch (tabid) { case "devTP": Ext.getCmp('MainSyslog').setActiveTab('DEVgalogs'); break; case "prodTP": Ext.getCmp('MainSyslog').setActiveTab('PRODgalogs'); break; case "intTP": Ext.getCmp('MainSyslog').setActiveTab('INTgalogs'); break; case "qaTP": Ext.getCmp('MainSyslog').setActiveTab('QAgalogs'); break; case "ssaTP": Ext.getCmp('MainSyslog').setActiveTab('SSAgalogs'); break; } Ext.getCmp('MainTP').setActiveTab(tabid); } listeners : { render : function () { this.items.each(function (i) { i.tab.on('activate', function () { switch (i.title) { case 'Development': var env = 'DEV'; gaService(env); break; case 'Production': var env = 'PROD'; gaService(env); break; case 'Integration': var env = 'INT'; gaService(env); break; case 'QA': var env = 'QA'; gaService(env); break; case 'SSA': var env = 'SSA'; gaService(env); break; default: alert("DONE"); } }); }); } }
  3. Thank you for the reply. I was able to get this working with a little re-coding effort. -Eric
  4. I was able to get my realtime function working in a new HLED chart, but I'd like to know if it's possible to pass arguments to the perl script I'm using to pass the real time data to my chart. The string I'd like to use is: "datastreamurl": "/perl/ops/garch/led_datafeed.pl -json led_location_dev.json" I've tried replacing the spaces with %20, but still not working. Thanks in advance for your help! -Eric