Kristi Carter Posted September 3 Posted September 3 How can you ma ke the y2axis scale the same as y1axis?
Kristi Carter Posted September 3 Author Posted September 3 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.
Solution David Beagan Posted September 4 Solution Posted September 4 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 1
Kristi Carter Posted October 16 Author Posted October 16 This is a great suggestions. I believe I can make this work. Thanks for the help.
Kristi Carter Posted October 17 Author Posted October 17 I wanted to include this as well, I got this option from an ibi ticket, which seemed to work as wel. We can make both axes to be same by using the "autoGlobal" property for the axis minimum and maximum values, added via the text editor. kindly refer the official tibco documentation, which contains the detailed information of Synchronizing both the axes, Doc: https://docs.tibco.com/pub/focus/9.3.0/doc/pdf/IBI_focus_9.3.0_html5_charts.pdf Topic: Synchronize the Axis Maximum and Minimum Values on Dual-Y and Split-Y Charts - Page no: 479 Kindly add the below command via the text editor, "yaxis": { "min": "autoGlobal", "max": "autoGlobal" }, "y2axis": { "min": "autoGlobal", "max": "autoGlobal" } 1
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