?
Solved

MSCHART HELP :::::

Posted on 2004-11-09
11
Medium Priority
?
1,045 Views
Last Modified: 2008-01-09
Hi everyone, can anyone tell me how do I show the values for mschart.

for example, I like to show the values of each bar. How that works in MSCHART? now, I have the graph,.... but, I can not see the value of each line. displaying it in 2d bar.

Thanks all
0
Comment
Question by:neonlights
  • 6
  • 5
11 Comments
 
LVL 5

Expert Comment

by:RogueSolutions
ID: 12534324

Double click on the bars and the Format Data Series window will appear.  Choose the Data Labels tab and make the option Show Value true.

You can then double click on the numbers that appear to format those.
0
 

Author Comment

by:neonlights
ID: 12535178
Hi RougeSolutions...Thanks for your solution.. question: are you talking about doing that in the design view? When I double click on it, it is taking into my code. and I right clicked on the mschart, and do not see Format Data Series.. in the properties window.

0
 
LVL 5

Expert Comment

by:RogueSolutions
ID: 12542834
Neon

My apologies, I was assuming MSChart is as flexible as it's bigger brother - Excel Charts.  Having created a VB app with an MSChart it's clear that it's a fairly basic version.

You can add the data point labels though by doing ...

    With MSChart1.Plot.SeriesCollection(1).DataPoints(-1).DataPointLabel
        .LocationType = VtChLabelLocationTypeAbovePoint
        .Component = VtChLabelComponentPercent
        .PercentFormat = "0%"
    End With

Assuming MSChart1 is your chart object

You'd put this code in after populating the chart with your data

You can repeat this for however many Series you have, the (1) determines which series you are adding the labels to.  You could create a loop to do all series as follows

For iSeries = 1 to MSChart1.Plot.SeriesCollection.Count
    With MSChart1.Plot.SeriesCollection(iSeries).DataPoints(-1).DataPointLabel
        .LocationType = VtChLabelLocationTypeAbovePoint
        .Component = VtChLabelComponentPercent
        .PercentFormat = "0%"
    End With
Next

The -1 index in the DataPoints collection tells MSChart what the default Data Point Label should be.  In theory you can then customise each Data Point individually.

There are other aspects you can set for your labels by the looks of it but you'll just have to experiment a bit.

Hope this helps
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:neonlights
ID: 12544380
Hi, thanks for your response. I needed to do graph on my vb program and I picked the first one...LOL .. MSCHART....

Do you suggest any graphs? If you do I would be very much appreciated... I found this mschart is very basic,,,,and not great...
raising to 500 points. Thank you for your help.
0
 
LVL 5

Expert Comment

by:RogueSolutions
ID: 12544520
You can add the Excel Chart by doing the following ...

In VB, goto Project ... Components

Select the Insertable Objects tab

There are two "OLE" objects to choose from ...

Microsoft Excel Chart
This gives you a fully functional Excel style chart (i.e. you can interact with it directly via the interface in VB as you might if you had a chart in Excel)

Microsoft Graph 2000 Chart
This inserts an Excel chart again, but this time its on its own worksheet and there is another worksheet available as well.  I guess this means you can use the spreadsheet to handle any maths needed.

Not used either of these in anger so don't know how easy it would be to actually get your own data into them and how much control over what the user can do you'll get.

---

The only other chart add-on I've used is called First Impression.  

Its a very powerful OCX and you create really impressive charts.  

It also had a companion product called Formula One which is a Excel "clone" as an OCX.  Giving you worksheet functionality on a VB form without the hassles/overhead of Excel OLE.

0
 

Author Comment

by:neonlights
ID: 12544704
Ok,,,, Lots of charts... ideas... Thank you....

Where can get the First Impression? like that name..... and Formula one?/

Do you have any examples of either one of them?

or even Microsoft Excel Chart?

Need to do few graphs but, I am very newbie to graphs...

Thanks
0
 

Author Comment

by:neonlights
ID: 12544975
Hi RougeSolutions -- RedSolutions.... lol

If you can give me some code to show how to fill the graph from  a database (tbl/qry) - would be very help ful.

Thanks.
0
 
LVL 5

Expert Comment

by:RogueSolutions
ID: 12545016

First Impression is now bundled as part of Formula One and are available from here ...

http://www.reportingengines.com/products/activex/index.jsp

There is a link at the bottom to download a free 30 day trial (obviously the software does cost normally).

I haven't used either in a few years so can't help much with detail of these.  Things are bound to have moved on since I had it.

---

The Excel Chart starts off with data in it so you can experiment with that initially.  I don't have any particularly examples I could give you.

They are very easy to work with, the best thing to remember is to not over-clutter your chart otherwise its message will get lost.  Masses of different colours/font sizes and such is always tempting but with charts simple is always best.

To get used to what Excel Charts can do you might be best to start of in Excel, create a few charts and change their look by using the standard interface Excel provides.  Having done that making changes via code will be easier as you'll be familar with the terminology - series, data point, axis, etc.


0
 
LVL 5

Accepted Solution

by:
RogueSolutions earned 2000 total points
ID: 12545342

You'll have to decide what chart package to use first.  I think that would have to count as a new question once you've had a stab at it, decided on your chart design and have enough information for the experts to work with.

I've not done it myself so don't have any handy code I can lift.

If you want more on the MSCHART then ...

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20450697.html

This question talks about loading the data and has a link to another example.

Best I can do.
0
 

Author Comment

by:neonlights
ID: 12545577
Cool, will get back to you.. Thanks for your information.
0
 

Author Comment

by:neonlights
ID: 12551215
Hi RougeSolutions, I am sorry not getting back earlier. I stuck with some query problems. Thank you very much for your help. In my program, I already started using MSCHART, but, I found that you really can't read the numbers. So, going to go with excel.

Thanks again! cheers!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

807 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