We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,534 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Creating a chart (Pie and Bar)

Hey all again,

I'm just wondering how you could get a graph to represent your data file (Such as a ValueListEditor) as I've had no success in managing to read from it or how it can be done.

Wanting something like this;

Video(5)
DVD(8)
CD(2)

Video..|-----
DVD....|--------
CD......|--
...........|____________
Many thanks,

2
Contributors
8
Replies
2 Days
Discussion Span
1 Year Ago
Last Updated
9
Views
garden4ork
Newbie Poster
12 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

If you use graph components, then you will have to format your data the way the component expects it. Usually, one on one usage of your data is not possible, unless you are using some generic method.

If you explain what your data looks like, and what component you are using, then we can possibly provide a solution for you.

pritaeas
Posting Prodigy
Moderator
9,533 posts since Jul 2006
Reputation Points: 1,194
Solved Threads: 1,494
Skill Endorsements: 98

The data is within a ValueListEditor with a name and quantity, and I'm using a chart to represent a graph however when I attempt to read any data I can only choose from random/no data/function.

I'm asking really how to use a chart and represent the data I have

garden4ork
Newbie Poster
12 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Which chart component ?

pritaeas
Posting Prodigy
Moderator
9,533 posts since Jul 2006
Reputation Points: 1,194
Solved Threads: 1,494
Skill Endorsements: 98

I'm not sure what you mean, I have used the one under 'additional', which as far as I know is called a Tchart - Using Delphi 6 by the way

garden4ork
Newbie Poster
12 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Any help at all? I'm not fussed which components that are required, just a way to get a graphical representation of sold items, like above a bar for 5 videos sold, 3 DVDs and 1 CD etc.

Thank you

garden4ork
Newbie Poster
12 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
pritaeas
Posting Prodigy
Moderator
9,533 posts since Jul 2006
Reputation Points: 1,194
Solved Threads: 1,494
Skill Endorsements: 98

Thanks, saw that before but didn't think it'd work but hey, it did!

One more problem - What is wrong with this?

Chart1.Series[0].AddXY(StrToInt(Form13.StringGrid1.Cells[1,2]), 15, 'Videos', clTeeColor);
garden4ork
Newbie Poster
12 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Looks okay, what's the problem?

pritaeas
Posting Prodigy
Moderator
9,533 posts since Jul 2006
Reputation Points: 1,194
Solved Threads: 1,494
Skill Endorsements: 98

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.0759 seconds using 2.68MB