Jump to content

Recommended Posts

Posted

I created a new Info Assist chart as we are forced to move away from App Studio charting in 8207.

It was fairly painless however I have an issue formatting the numbers on labels.

This is what I want. These charts are from App Studio. To be honest, I made NO changes to the default for the labels which was: General. Notice how App Studio seems to format the number automatically depending on how big they are. Examples from App Studio:

 

 

 

So I am looking for similar behavior from Info AssistHOWEVER, I can not get this to work. FYI leaving the default: GENERAL for labels ALWAYS show the ENTIRE numberwhich can get quite big. Trying General(K) or General(M) is doing something funky stuff which we DO NOT likesee examplenote the number of decimals:

 

Further, I messed around with the settings in IA and now I am stuck. No matter what I do or set the label format to be: #k / #M / $K / $M etcit never changes. I suspect I will need to rebuild the chart.

So, how do I get the IA chart to behave like the App Studio chart

Posted

More infoI may not be as stuck as I thought. It seems if I click on the particular series I can affect the label format to some degree. I chose the FIRST series and set it to Millions and it took my change:

 

image.png1362617 66.6 KB

 

Next I clicked on the series bar itself and saw: Edit Format, I assume it applies to the labels but no matter what I do here it makes no difference. I thought I could control how many decimals etcnope!

 

image.png939520 18.1 KB

 

Now I get this:

 

.02M I can see but who needs all those extra decimals. Further App Studio formatted by itself adjusting to M/K etc as necessary.

Posted

and finally. I found this settingnot exactly sure what it is doing but at least it shows the entire number, I applied it to series 0:

 

image.png859420 14.2 KB

 

 

HOW DO I GET TO SHOW : 3.2M or if the number were only 320,645, perhaps show 320K etc etc, again, somehow App Studio did this automatically based on the size of the number.

Posted

The IA manual doesnt have enough info for the Format Labels | Use Pattern option. However, the Creating HTML5 Charts page 89 starting with Reference: Summary of Format String Characters, gives quite a few options you can use for Custom Format. I was able to figure this out:

 

image.png1341610 38.2 KB

 

This Custom Format [>=1000000]#,#,.#M;#,#,K is a bit cryptic, but enables both Millions and Kilos on the same chart:

Posted

Well, I had no luck. Are you on 8207v27 I get this error:

 

this is how it was set:

 

Also, I hit save foolishly without backing up and lost the chart. I got it back by editing the text and removing the new code.

Perhaps this is yet another 8207 issuenot sure.

Posted

It worked for me in 8207.24. Could be a bad interaction with something else already present in your existing code.

What if you try something simpler:

#,#,,.#M

 

Do you get the error with this code:

GRAPH FILE ggsales

SUM DOLLARS

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 *

TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $

TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $

*GRAPH_SCRIPT

setAutofit(getDataText(),false);

setDisplay(getDataText(0), true);

setTextFormatPattern(getDataText(),"[>=1000000]#,#,,.#M;#,#,K");

-*setTextFormatPattern(getDataText(),"#,#,,.#M");

*END

ENDSTYLE

END

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...