Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to use MSChart's SetChartData()?

Posted on 2000-04-26
4
Medium Priority
?
1,027 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 40 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

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…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

604 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