Jump to content

Recommended Posts

Posted

I have a report that displays one pie chart per year. If the measurement for that year is 0, then I get an empty white pie chart.

 

image.png895308 15.6 KB

 

Instead of displaying a white circle, I was wondering is if I can style this chart when the measurement is zero. Like make it a solid black color Or display a message by it like No Data To Display. Or display 0%.

Thanks

Todd

Posted

Good thought Chuck.

Here is a simple CAR example. Using a pie ring chart that displays sales per car across country. The Peugot is sold in France but has 0 Sales. What I was wondering is 1) if 0 could be displayed inside this pie ring showing the actual sales figure; 2) style the ring in another color rather than white.

 

image.png854426 29.4 KB

 

Here is the code for this chart as generated by InfoAssist:

ENGINE INT CACHE SET ON

SET PAGE-NUM=NOLEAD

-DEFAULTH &WF_HTMLENCODE=OFF;

SET HTMLENCODE=&WF_HTMLENCODE

 

SET ARGRAPHENGINE=JSCHART

-DEFAULTH &WF_EMPTYREPORT=ON;

SET EMPTYREPORT=&WF_EMPTYREPORT

 

SET EMBEDHEADING=ON

SET GRAPHDEFAULT=OFF

-DEFAULTH &WF_STYLE_UNITS='PIXELS';

-DEFAULTH &WF_STYLE_HEIGHT='405.0';

-DEFAULTH &WF_STYLE_WIDTH='770.0';

 

-DEFAULTH &WF_TITLE='WebFOCUS Report';

GRAPH FILE ibisamp/car

-* Created by Info Assist for Graph

SUM CAR.BODY.SALES

BY CAR.ORIGIN.COUNTRY

BY CAR.COMP.CAR

ON GRAPH PCHOLD FORMAT JSCHART

ON GRAPH SET VZERO OFF

ON GRAPH SET GRWIDTH 1

ON GRAPH SET UNITS &WF_STYLE_UNITS

ON GRAPH SET HAXIS &WF_STYLE_WIDTH

ON GRAPH SET VAXIS &WF_STYLE_HEIGHT

ON GRAPH SET LOOKGRAPH PIE

ON GRAPH SET AUTOFIT ON

ON GRAPH SET STYLE *

*GRAPH_SCRIPT

 

setPieDepth(0);

setPieTilt(0);

setDepthRadius(0);

setCurveFitEquationDisplay(false);

setPlace(true);

setPieFeelerTextDisplay(1);

 

*END

INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$

TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $

TYPE=DATA, COLUMN=N1, BUCKET=column, $

TYPE=DATA, COLUMN=N2, BUCKET=color, $

TYPE=DATA, COLUMN=N3, BUCKET=measure, $

*GRAPH_SCRIPT

 

setReportParsingErrors(false);

setSelectionEnableMove(false);

*GRAPH_JS_FINAL

"pieProperties": {

"holeSize": "65%"

},

"agnosticSettings": {

"chartTypeFullName": "Pie_Ring"

}

 

*END

ENDSTYLE

END

 

-RUN

Posted

Todd

Thank you for this sample I was hoping it would be something as simple as conditional styling but that made no difference with the color. I am going to pass this by our internal chart expert to get his opinion

In the mean time I added this WHERE CAR.BODY.SALES NE 0; and it eliminates the pie chart for France completely

Posted

Todd

I confirmed with Product management that what you are wanting is not possible right now, what you are seeing is how it works. They said they would consider it as a new feature request. So the WHERE clause is the only way to eliminate the white pie chart for now.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...