Solved

How to use MSChart's SetChartData()?

Posted on 2000-04-26
4
1,004 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.

762 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