Solved

How to use MSChart's SetChartData()?

Posted on 2000-04-26
4
992 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
Comment Utility
VARIANT var;
var.lVal = 10;
m_chart.SetChartData(var);
0
 

Author Comment

by:kelamayi
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
bigDiff challenge 17 74
tripleUp challenge 7 65
zeroFront challenge 7 70
Fibonacci challenge 11 82
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 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

14 Experts available now in Live!

Get 1:1 Help Now