Solved

How to use MSChart's SetChartData()?

Posted on 2000-04-26
4
1,006 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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