Link to home
Start Free TrialLog in
Avatar of neonlights
neonlights

asked on

MSCHART HELP :::::

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
Avatar of RogueSolutions
RogueSolutions


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.
Avatar of neonlights

ASKER

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.

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
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.
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.

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
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.

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.


ASKER CERTIFIED SOLUTION
Avatar of RogueSolutions
RogueSolutions

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Cool, will get back to you.. Thanks for your information.
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!