Quantcast
Channel: SCN: Message List - SAP Manufacturing Integration and Intelligence (SAP MII)
Viewing all articles
Browse latest Browse all 4841

Issues with i5Chart in MII 14.0 SP4

$
0
0

Hi,

 

I am trying to draw an i5Chart in MII, using a TagQuery referring to http://scn.sap.com/thread/390743

 

Here is my code:

 

<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE>{Title}</TITLE>
<META http-equiv="X-UA-Compatible" content="IE=edge">
<META http-equiv='cache-control' content='no-cache'>
<META http-equiv='expires' content='0'>
<META http-equiv='pragma' content='no-cache'>
<LINK href="/XMII/CM/TestProject/000_Common/30_CSS/Content.css" rel="stylesheet" type="text/css"/>
<SCRIPT language="javascript" src="/XMII/CM/TestProject/000_Common/20_JSFiles/UtilityFunctions.js" type="text/javascript"></SCRIPT>
<SCRIPT type="text/javascript" src="/XMII/JavaScript/bootstrap.js" data-libs="i5Chart,i5Grid"> </SCRIPT>

<SCRIPT language="javascript" type="text/javascript">
function bodyLoad()
{
var chartobj = new  com.sap.xmii.chart.hchart.i5Chart("TestProject/010_Configuration/20_DisplayTemplates/TagHistoricalTrendUI5","TestProject/010_Configuration/10_QueryTemplates/GetHistoricalTagValue");
chartobj.getQueryObject().setTagName(1,document.getElementById("hidTagName").value);
chartobj.getQueryObject().setDuration(60);
chartobj.getQueryObject().setDurationUnits("S");
chartobj.getQueryObject().setRowCount(20);

chartobj.setPropertyValue("ValueColumns", document.getElementById("hidTagName").value);
chartobj.setPropertyValue("LabelColumns", "DateTime");

chartobj.draw("myDiv1");

chartobj.update(true);
}

function PopupHide() {
top.document.getElementById("ScreenDisabler").style.display = 'none';
top.document.getElementById("AlertPopupShell").style.visibility = 'hidden';
return null;
}
</SCRIPT>
</HEAD>
<input id="hidTagName" type="hidden" value="{TagName}"/>

 

<BODY height="100%" onload = "bodyLoad();">
<DIV  id="Main" class="PopupFrameOut" style="width: 100%; height: 100%">
<!-- === Content  ============================================================= -->
<TABLE  class="PopupFrameIn" cellpadding="0" cellspacing="0" width="100%" height="100%" >
<TR>
<TD width="99%" class="PopupTitleBar">
  <SPAN class="PopupTitle" align="left">{Title}</SPAN>
</TD>
<TD width="1%" class="PopupTitleBar" align="right">
  <A href="javascript: PopupHide();" class="boldbuttons" align="right"><SPAN>X</SPAN></A>
</TD>
</TR>
<!-- === Message Area ==============================================================-->
<TR>
<TD class="ContentHeaderSection" colspan="2">
  <div id="myDiv1"></div>
</TD>
</TR>
</TABLE>
</DIV>
</BODY>

</HTML>


Here is the list of issues I have come across:

 

  1. When I am passing RowCount as 0 from Tag Query and modifying at runtime by javascript  "chartobj.getQueryObject().setRowCount(20);", in chart it is plotting exactly 20 data points but in the DATA -> Export Raw Data as HTML, it exports only one row.
  2. chartobj.getQueryObject().setTagName(1, "AssetUtil3"); is setting tagname but not updating the chart when I use chartobj.update(true). Same with ValueColumns and LabelColumns.
  3. setDuration, setDurationUnits and setRowCount is working while drawing chart but not serTagName.
  4. If the query template does not return any value, the chart is not plotted with chartobj.draw("myDiv1");
  5. If I set, initialUpdate of the query template to unchecked, the chart displays "no data". Even if I use update, draw or refresh it does not update the chart.

 

Regards,

Prashant


Viewing all articles
Browse latest Browse all 4841

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>