Solved

How to use MSChart's SetChartData()?

Posted on 2000-04-26
4
998 Views
Last Modified: 2013-11-20
SetChartData() need a VARIANT type parameters, maybe it is a multi-d array. Please How to use the function?
Thanks in advance!
0
Comment
Question by:kelamayi
  • 2
4 Comments
 
LVL 3

Expert Comment

by:V_Bapat
ID: 2755467
VARIANT var;
var.lVal = 10;
m_chart.SetChartData(var);
0
 

Author Comment

by:kelamayi
ID: 2756107
First, Thank you very much! but your propose isn't success. when I do as you say, I received a caution that "bad function argument". I think this is still the problem about parameters pass.
0
 
LVL 3

Expert Comment

by:V_Bapat
ID: 2758162
This is the way I do and it works. If you could send some code, it will be useful.

Also explain how you added the chart control and what you are doing.
0
 

Accepted Solution

by:
orozco earned 20 total points
ID: 2878445
Hi!
you can use the following code to
add some data to your mschart object:

for example to add the numbers:
100, 50, 20, 90
to column 1 do the following:

        MSGObject.SetRow(1);
      MSGObject.SetColumn(1);
      MSGObject.SetData("100");
      MSGObject.SetRow(2);
      MSGObject.SetColumn(1);
      MSGObject.SetData("50");
      MSGObject.SetRow(3);
      MSGObject.SetColumn(1);
      MSGObject.SetData("20");
      MSGObject.SetRow(4);
      MSGObject.SetColumn(1);
      MSGObject.SetData("90");      

if you want to put more data, you can
do it with a for cycle.
It must work.
good luck.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Decoding 32 bit binary streams 6 37
WinWaitActive parameters 12 31
mapAB Challlenge 35 124
Capture logon name 11 31
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now