Skip to Content
0
Former Member
Jun 20, 2007 at 08:40 AM

Dynamic Values in Business Graphics Tool Tip

10 Views

hi,

I am using business graphics ui element in my webdynpro application.I am able to get the graghical output correctly.I want to have tool tip in my graph so when I place the cursor on a point, the tool tip should give the corresponding value.I have used the following code

 try
    {
    
	String[] catLabels = { 

				"Team 1", "\1Tomoko Akino", "\1Hans Bosch", "\1Marvin Smith",
				"Team 2", "\1Jose Vega", "\1Bao Yin", "Out of office" };

 

	   String[][] pointCustomizing = {

				{ "approved", "cancelled", "approvedPartTime" },

				{ "approved" },

				{ "approved" },

				{ "sent", "approvedPartTime", "notsentPartTime", "notsent"},

				{ "approved", "zSeveralEntries", "zSeveralEntries",

				  "zSeveralEntries", "zSeveralEntries", "zSeveralEntries", 

				  "zSeveralEntries" },

				{ "outOfOffice", "outOfOffice", "outOfOffice", "outOfOffice",

				  "outOfOffice", "outOfOffice", "outOfOffice", "outOfOffice",

				  "outOfOffice", "outOfOffice", "outOfOffice", "outOfOffice", 

				  "outOfOffice", "outOfOffice", "outOfOffice" }

	   };

    

	   String[][] pointLabels = {

				{ " ", " ", " " },

				{ " " },

				{ " " },

				{ " ", " ", " ", " "},

				{ " ", " ", " ", " ", " ", " ", " " },

				{ "1", "2", "2", "2", "4", "3", "3", "3", "1", "1", "2", "1",

				  "2", "1", "1" }

	   };

 

	   String[][][] timeValues = {

				{ { "20020528", "20020606" }, { "20020606", "20020608" }, 

				  { "20020610", "20020611" } },

				{ { "20020531", "20020606" } },

				{ { "20020607", "20020613" } },

				{ { "20020527", "20020601" }, { "20020606", "20020607" }, 

				  { "20020612", "20020613" }, { "20020617", "20020619"} },

				{ { "20020531", "20020606" }, { "20020531", "20020601" }, 

				  { "20020601", "20020602" }, { "20020602", "20020603" }, 

				  { "20020603", "20020604" }, { "20020604", "20020605" }, 

				  { "20020605", "20020606" } },

				{ { "20020527", "20020528" }, { "20020528", "20020529" },

				  { "20020529", "20020530" }, { "20020530", "20020531" }, 

				  { "20020531", "20020601" }, { "20020603", "20020604" }, 

				  { "20020604", "20020605" }, { "20020605", "20020606" }, 

				  { "20020606", "20020607" }, { "20020607", "20020608" },

				  { "20020610", "20020611" }, { "20020611", "20020612" }, 

				  { "20020612", "20020613" }, { "20020617", "20020618" }, 

				  { "20020618", "20020619" }}

	   };

	   String s[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","a1","a2","a3","a4","a5","a6","a7","a8","a9","a10","a11","a12","a13","a14",};


	   IPrivateSBusinessGraphicsSampleView.ICategoryNode catNode = wdContext.nodeCategory();

	   for (int catIndex = 0; catIndex < catLabels.length; ++catIndex)

	   {

		 IPrivateSBusinessGraphicsSampleView.ICategoryElement  catElement = catNode.createCategoryElement();

		 catNode.addElement(catElement); 

		 catElement.setDescription(catLabels[catIndex]);

	   }

    

	   // loop over series

	   IPrivateSBusinessGraphicsSampleView.ISeriesNode seriesNode = wdContext.nodeSeries();

	   for (int seriesIndex = 0; seriesIndex < timeValues.length; ++seriesIndex)

	   {

		 IPrivateSBusinessGraphicsSampleView.ISeriesElement seriesElement = seriesNode.createSeriesElement();

		 seriesNode.addElement(seriesElement);

 

		 // set series attributes (...)

		 IPrivateSBusinessGraphicsSampleView.IPointNode pointNode = seriesElement.nodePoint();

 

		 // loop over points

		 for (int pointIndex = 0; pointIndex < timeValues[seriesIndex].length; ++pointIndex)

		 {

		   IPrivateSBusinessGraphicsSampleView.IPointElement 

				   pointElement = pointNode.createPointElement();

		   pointNode.addElement(pointElement);  

		   String ename = s[pointIndex];
		   wdComponentAPI.getMessageManager().reportSuccess("name:"+ename);

		   pointElement.setStartValue(timeValues[seriesIndex][pointIndex][0]); 

		   pointElement.setEndValue(timeValues[seriesIndex][pointIndex][1]);

		   pointElement.setCuId(pointCustomizing[seriesIndex][pointIndex]);

		   pointElement.setLabel(pointLabels[seriesIndex][pointIndex]);     
		   
		   pointElement.setToolTip(ename );

		 }

	   }

   

		}

    
	catch(Exception e)
	   {
		   wdComponentAPI.getMessageManager().reportSuccess("exc2:"+e); 
	   }

By the above code ,I am getting the tool tip with the value "a" in all locations.

But I need to have different values in the tooltip corresponding to the location.

Please Help....

Thanks in advance,

Shamila