Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Need To Create A "Status" Tracking Pie Chart
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Need To Create A "Status" Tracking Pie Chart
 Login/Join
 
Member
posted
In a similar fashion to how Pizza Hut has their tracker that lets you know what step the pizza is on as it is delivered to you, one of my clients wants to have a pie chart that tracks their work status. We have a piece of work that will move through a process, where it will receive a different "status" as it reaches certain criteria. Unfortunately I am unable to use Info Assist functionality to recreate this. Either it creates multiple pie charts for each status, or it only lets me use one at a time.

I am able to to make this happen with a bar chart, but my client is strongly pushing a pie chart.

I believe this will have to be done with a calculated field, where all of the different statuses are lumped into one field, and will be conditionally selected.

Any ideas or direction would be appreciated.

This message has been edited. Last edited by: FP Mod Chuck,
 
Posts: 2 | Registered: November 08, 2019Reply With QuoteReport This Post
Virtuoso
posted Hide Post
There are few chart extensions but I haven't seen one that fits this exact scenario. If you can find the chart type in github you could probably write a D3 extension for this spec.

What version of WebFOCUS are you using? It's not in your signature.


WebFOCUS 8206, Unix, Windows
 
Posts: 1743 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Expert
posted Hide Post
Here is a little something I cooked up.

You will need to set up an ajax call to get the status and update the chart accordingly.

Tested in v8.1.04 and v8.2.06

-MRNOEDIT EX -LINES * EDAPUT MASTER,PIZZA,CV,FILE
FILENAME=PIZZA, SUFFIX=FIX,$
SEGNAME=PIZZA, $
  FIELD=EVENT ,ALIAS=  ,A20,A20 ,$
  FIELD=TIME  ,ALIAS=  ,I9 ,A9 ,$
EDAPUT*

-MRNOEDIT EX -LINES * EDAPUT FOCTEMP,PIZZA,CV,FILE
1 Order Received            1
2 Order Prepared            1
3 Cooking                   1
4 Ready                     1
EDAPUT*

-RUN

FILEDEF PIZZA DISK pizza.ftm (LRECL 29 RECFM V

-RUN
GRAPH FILE PIZZA
SUM TIME AS ''
ACROSS EVENT AS ''
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET HAXIS 600
ON GRAPH SET VAXIS 500
ON GRAPH SET STYLE *
*GRAPH_JS
introAnimation: {
   enabled: true,
   duration: 1000
},
pieProperties: {rotation:315},
series: [
   {series: 0, color: 'cyan', showDataValues:true, explodeSlice: 30},
   {series: 1, color: 'bisque', showDataValues:false},
   {series: 2, color: 'slateblue', showDataValues:false},
   {series: 3, color: 'red', showDataValues:false},
],
dataLabels: {
   visible: true, 
   formatCallback: function(d,s,g){var lbl = this.getSeries(s).label;return lbl ;}
}
*END
ENDSTYLE
END

-RUN

-HTMLFORM BEGIN
  <script>
	var myChart = null ;
	var pollNum = 1 ;
	setTimeout(getChart(), 5000);
	function getChart() {
		myChart = document.getElementById("jschart_HOLD_0").chart ;
		setTimeout(function() {poll();}, 5000);
	}
	function poll() {
		pollNum++;
		// ajax call to get current status goes here
		myChart.pieProperties.rotation = (myChart.pieProperties.rotation-90<0)?315:myChart.pieProperties.rotation-90;
		for (var s=1;s<myChart.series.length;s++) {
			myChart.series[s].explodeSlice=(s==pollNum)?30:0;
		}
		myChart.series[pollNum].showDataValues = true ;
		myChart.redraw(myChart.documentRoot);
		if (pollNum<4) setTimeout(function() {poll();}, 5000);
	}
  </script>

-HTMLFORM END
-RUN



Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6163 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Member
posted Hide Post
@BabaNYC, we are running 8.2.3? I hope I am saying that right. I will definitely take a look at GitHub.
@Waz, I will give that a try and get back to you if I am stuck.
Thank you so much for the replies!
 
Posts: 2 | Registered: November 08, 2019Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Not sure if 8203 has this option but there is a feature to turn on "Real-time refresh" on a chart built using Designer. We see it on 8206 for sure.


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 246 | Location: Houston,TX | Registered: June 11, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Need To Create A "Status" Tracking Pie Chart

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.