Normal Topic StaticChart Command (Read 586 times)
Acebanner
Full Member
***
Offline



Posts: 123
Location: New York City
Joined: Jan 23rd, 2008
StaticChart Command
Oct 22nd, 2010 at 7:46pm
Print Post Print Post  
I'm trying to compare a series of string arrays. One string array contains square footage areas, and the second string contains the price per square foot.

Code
Select All
A_String = "10;20;30;40;50;60"
P_String = "10,9,8,7,6,5.5"
 



What I'm trying to do is use the @StaticChart command to overlay two charts created using these two strings.

Code
Select All
var A as Int
var P as Int
var n as Int // Looping
var A_Labels as String
var P_Labels as String

For n = 1 to @CountStringArray(A_String)
	A_Labels = @AppendStringArray(A_Labels, "A" + @AccessStringArray(A_String, n))
Next

P = @StaticChart(CHART_TYPE_LINE, @XPOS(ChartBox), @YPOS(ChartBox), @WIDTH(ChartBox), @HEIGHT(ChartBox), P_STRING, P_STRING)
A = @StaticChart(CHART_TYPE_LINE, @XPOS(ChartBox), @YPOS(ChartBox), @WIDTH(ChartBox), @HEIGHT(ChartBox), A_STRING, A_Labels)

 



The programming I have now will display only one chart. I suspect that the other chart is below it -- is there a way to set their transparency that I'm missing?

NINJA EDIT: Oh, I noticed something else sort of weird about the command (probably unique to me, LOL) -- when I view the programming in the Program Editor using syntax highlighting the "@StaticChart" is highlighted in blue -- except for the "@" symbol. Testing the program gives no bugs and the program runs fine. Just something for the bug list maybe.
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: StaticChart Command
Reply #1 - Oct 22nd, 2010 at 8:15pm
Print Post Print Post  
@StaticChart is a simple command that plots a single set of data points. In your case, it appears you want to have one set of data plotted against the other, so that one appears as the X axis and the other plots on the chart. You're going to need to shell out to Excel or some such program with built-in charting.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: StaticChart Command
Reply #2 - Oct 26th, 2010 at 9:22pm
Print Post Print Post  
BTW, Ace, you can also use that technique Cow showed in another thread for embedding Google Maps to embed Google Charts. It works nicely. Here's a screenshot:

  

chart.png (Attachment deleted)

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged