Link to home
Start Free TrialLog in
Avatar of philcrouch
philcrouch

asked on

MSChart Data Aware

Hey all

Ok i am not sure this weather the mschart is the rght tool for the job but it is a starting point.

I have a problem

I have some data stored in my database that run behind my VB front end.  For simplicity sake i will give explain only fields required.

RA# - agreement Number
StartDate - start date agreememnt
EndDate - end date of agreement

So i have a list of RA# and when they are happening

I want to display this visually in a month.

so i forsee there being a bar chart/graph with 1-31 accross the bottom of the chart and then bars in the horizontal position relating to the days the RA's are on

does this sound reasonable

also the month displayed would alos have to be chosen by the user.

400 points up for offer for a answer that gets me working fully

any sujestions?
ASKER CERTIFIED SOLUTION
Avatar of adg
adg

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

Also, I forgot to mention that you can adjust the width of the lines to make them look more like bars.  Example:   serx.Pen.Width = 100
Avatar of philcrouch

ASKER

Ok i will test that out

thanks

I am not sure if a chart is the entirely right way to go about it as the data does not all start from 0

below is example data

ra# 1
Start 1/1/01
End   7/1/01

ra# 2
Start 5/1/01
End  15/1/01

rs# 3
Start 11/1/01
End   17/1/01


so if i was to plot or display these it would look like this





 3                                            *****************  


RA#?s  2                       ***********************


 1         ***********

1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16-17-18-19-20???

               Days of Month
                    Jan





that did not work out right......





       3                         *****************  


RA#?s  2           **************************


       1   *************

           1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16-17-18-19-

               Days of Month
                    Jan
adg

i just tested your comments and i like what i am seeing

could you now tell me how i related the data series to my data from my database?

adg

i just tested your comments and i like what i am seeing

could you now tell me how i related the data series to my data from my database?

adg

i just tested your comments and i like what i am seeing

could you now tell me how i related the data series to my data from my database?

I was hoping that was what you were looking for! I can see why you ask about the dataseries - it's not very intuitive.  As you can see each "Bar" is using up two series, like this:

 1,series is the X1 value (starting day between 1 and 31)
 2,series is the Y1 value (1 = 1st RA#, 2 = 2nd RA#, etc.)

 1,series+1 is the X2 value (ending day between 1 and 31)
 2,series+1 is the Y2 value (same as Y1)

So the first RA# uses series 1 and 2, the second RA# uses series 3 and 4, etc. So for the 5th RA number I calculate the series as 5*2-1 = 9 and 5*2 = 10 and use the 9th and 10th series to chart the 5th RA#.  Hope that clarifies it but if not just let me know.  

Did you get to use the "serx.Pen.Width = 100"? It really improves the appearance of the chart.  
 
adq

that is excellent.
I had actually just finished working that bit out :)
Sorry to be a bother

I am not just tryiing to get the information from the database through a recordset and put it into the dataseries.

I am going to give you the points, cause it was what i was after, i am just gong to leave it open for a while so i can ask any more questions if that is ok.......

thanks again

ps
i did set the pen and it does look better, thanks
No problem.  I don't know much about databases but I can manipulate ADO recordsets to some degree so if that is giving you any trouble feel free to ask.  
Ok i am going fine with the record set but now i have a question about the chart


is there a way i can have the y axis not being in scale

the reason i ask is that my vales up the y axis are the RA numbers

these can atucally be values as follows


4
765
234
34
123


and if i plot those one the chart it is tiny.

so can i just have them liked spaced evenly and maybe a lable beside saying the ra # ?

thanks again



I tried for hours last night to change the Y-axis labels on an XY mschart and so far have been unable to do so.  I also tried using datapoint labels (with the series name) which sort of worked but didn't look very good.  Anyway, I haven't given up but if I'm able to figure it out I'll post the info to https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20187325 
adq

thanks very much

This is what i have asked for so i have given you the points.  Thanks heaps for your help in this

I have left it at 300 but opened another question at 200 points for the additional part of the question.

It would be great if you can help me out with that.

https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=visualbasic&qid=20187325