Kristi Carter Posted Tuesday at 07:13 PM Share Posted Tuesday at 07:13 PM How can you ma ke the y2axis scale the same as y1axis? Link to comment Share on other sites More sharing options...
Kristi Carter Posted Tuesday at 07:14 PM Author Share Posted Tuesday at 07:14 PM I want to clarify, I want this to happen without hardcoding any value, it needs to be set based on the data that create the y1axis. Link to comment Share on other sites More sharing options...
David Beagan Posted Wednesday at 03:28 AM Share Posted Wednesday at 03:28 AM You could calculate the max bar value, -READFILE it into a variable and then set that for both scales. Here's an example. DEFINE FILE ibisamp/ggsales BOTH/P14 = DOLLARS + UNITS; END TABLE FILE ibisamp/ggsales SUM BOTH BY REGION ON TABLE HOLD AS SCALEMAX END TABLE FILE SCALEMAX SUM MAX.BOTH ON TABLE HOLD AS MAXSCALE -RUN -SET &BOTH = 0; -READFILE MAXSCALE -SET &BOTH = &BOTH * 1.05; GRAPH FILE ibisamp/ggsales SUM DOLLARS UNITS BY REGION ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET VZERO OFF ON GRAPH SET GRWIDTH 1 ON GRAPH SET LOOKGRAPH BAR ON GRAPH SET AUTOFIT ON ON GRAPH SET STYLE * *GRAPH_SCRIPT setPlace(true); setScaleMax( getY1Axis(), &BOTH ); setScaleMax( getY2Axis(), &BOTH ); *END INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$ TYPE=DATA, COLUMN=N2, BUCKET=y-axis(1), $ TYPE=DATA, COLUMN=N3, BUCKET=y-axis(2), $ TYPE=DATA, COLUMN=N1, BUCKET=X-axis, $ *GRAPH_SCRIPT setReportParsingErrors(false); setSelectionEnableMove(false); *GRAPH_JS_FINAL "blaProperties": { "seriesLayout": "stacked" }, "agnosticSettings": { "chartTypeFullName": "Bar_Stacked_Dual_Axis" } *END ENDSTYLE END Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now