The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Sparklines

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Chris2 Posted - 09/13/2010 : 10:20:07 AM
Windows Vista
Origin 8.1.

Hello,

how can I show the Sparklines in each column?
In Laptalk I just can write

sparklines;

However in Origin C I have no idea.

Hope you can help me!
7   L A T E S T    R E P L I E S    (Newest First)
Chris2 Posted - 09/15/2010 : 02:11:58 AM
Your second suggestion works perfekt!
Thank you very much!
DataConv Posted - 09/14/2010 : 08:32:04 AM
Hello Chris2,
Maybe the LT syntax you are using is wrong?
string strCommand = "sparklines iw:=[Book + strEinheit]Sheet1! sel:=0 c1:=a c2:=a;";

My proposal would be:
string strCommand = "sparklines iw:=[Book%(strEinheit)]Sheet1! sel:=0 c1:=a c2:=a;";

or
string strCommand = "sparklines iw:=[Book" + strEinheit + "]Sheet1! sel:=0 c1:=a c2:=a;";
Chris2 Posted - 09/14/2010 : 06:33:57 AM
The parameter iw just works to me if I can write the number of the book directly. But in my case the specified Book isn't always the same.
Here is a part of my code (I hope you can understand my problem if you see it):

string strEinheit;
wksFunction.GetCell(iRow, 7, strEinheit);
WorksheetPage wksPage3("Book" + strEinheit);
Worksheet wksDest = wksPage3.Layers("Sheet1");

//this is the Book and Sheet I want to refer to

I tried already the following but nothing works.

string strCommand = "sparklines iw:=wksDest! sel:=0 c1:=a c2:=a;";

string strCommand = "sparklines iw:=[Book + strEinheit]Sheet1! sel:=0 c1:=a c2:=a;";


Penn Posted - 09/14/2010 : 04:56:35 AM
Hi,

Please refer to the sparklines document. The parameter iw can be used to specify a worksheet.

Penn
Chris2 Posted - 09/14/2010 : 04:09:03 AM
Hi,

thanks for your answer. This helps me a lot.
But how is it possible to set the sparklines in one specefic worksheet and not in the active sheet?
Penn Posted - 09/13/2010 : 11:14:02 PM
Hi,

There is a more simple way to do that, by using the LT_execute function.

void test_sparklines()
{
	string strCommand = "sparklines sel:=0 c1:=1 c2:=3;";
	LT_execute(strCommand);
}


Penn
rlewis Posted - 09/13/2010 : 8:11:24 PM
You can always make a call to the xFunction Sparklines using code something like ...

#include <xfbase.h>
bool ShowSparkLines(int StartCol=0, int EndCol=-1)
{
	/*
		StartCol ... First column for the operation ... default first column the worksheet
		EndCol   ... Last column for the operation ... default last column of the worksheet
	
	*/
	Worksheet Wks=Project.ActiveLayer();
	if(EndCol<0)
	{
		EndCol=Wks.GetNumCols()-1;
	}
	if(Wks.IsValid()==true && StartCol>=0 && StartCol<=EndCol && StartCol<Wks.GetNumCols())
	{
		string strXFname="SparkLines";
		XFBase xfSparkLines(strXFname);
		if(xfSparkLines)
		{
			if(xfSparkLines.SetArg("c1",StartCol)==true && xfSparkLines.SetArg("c2",EndCol)==true && xfSparkLines.SetArg("sel",0)==true)
			{
				return(xfSparkLines.Evaluate());
				
			}
		}
	}
	return (false);
}


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000