Pie,Line and Bar chart resources
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Pie,Line and Bar chart resources
Hi,
could someone give me a link/resources where I can learn about this topic?
I want to construct pie chart with 3 sections 10,20 and 70% and each section would have different color and percentage label.
I want to construct line chart going from [0,0] to [10,10] to [20,15] to [70,30] also x,y label
I want to construct bar chart with 10,20 and 70%. Each bar would have different color and percentage label and also x,y label
I do not want to use another third party engine/tool to create these charts unless its open source.
Thanks
could someone give me a link/resources where I can learn about this topic?
I want to construct pie chart with 3 sections 10,20 and 70% and each section would have different color and percentage label.
I want to construct line chart going from [0,0] to [10,10] to [20,15] to [70,30] also x,y label
I want to construct bar chart with 10,20 and 70%. Each bar would have different color and percentage label and also x,y label
I do not want to use another third party engine/tool to create these charts unless its open source.
Thanks
Re: Pie,Line and Bar chart resources
Draw a circle, set start and arc from the property inspector.antrax13 wrote:
I want to construct pie chart with 3 sections 10,20 and 70% and each section would have different color and percentage label.
Draw a line, set the points toantrax13 wrote: I want to construct line chart going from [0,0] to [10,10] to [20,15] to [70,30] also x,y label
Code: Select all
0,0
10,10
20,15
70,30
Draw 3 different rectangles. Change their colors and rect property.antrax13 wrote: I want to construct bar chart with 10,20 and 70%. Each bar would have different color and percentage label and also x,y label
Otherwise you can crate just one rectangle and play with gradients.

Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: Pie,Line and Bar chart resources
that was not helpful at all
Re: Pie,Line and Bar chart resources
Wow antrax13,
Everything MaxV said was correct. A more positive response would be "I don't understand what you mean, could you explain it a bit more?" or "Where do I find out about arc?".
99% of the posts in these forums are from volunteers, nobody has to help you here.
Simon
Are you trying not to be helped?that was not helpful at all
Everything MaxV said was correct. A more positive response would be "I don't understand what you mean, could you explain it a bit more?" or "Where do I find out about arc?".
99% of the posts in these forums are from volunteers, nobody has to help you here.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Pie,Line and Bar chart resources
What Simon said.
I suspect, and hope, that the comment was not as abrasive as it seemed. Communication via text must be carefully crafted.
What I think was really meant was: Can I get a code example?
So antrax13, was that it?
Craig Newman
I suspect, and hope, that the comment was not as abrasive as it seemed. Communication via text must be carefully crafted.
What I think was really meant was: Can I get a code example?
So antrax13, was that it?
Craig Newman
Re: Pie,Line and Bar chart resources
What I am looking for is just some sort of examples/code/resources where to read/see how its done for pie, line and bar chart.
To draw line chart it is not so simple as it looks like if you just join points. It will not work if your axis must be flexible you do not want to show for example bar charts with values of 20 and 30 where Y axis is max 100 then its easy what if your values will be 10,10000 in that case you want to have max value of Y axis set to 10000+ but your Y axis will be the same size as 100 so you need to calculate coordinates in that case point [10,10] will not be at the same location where Y is 100 than the same point where Y is 10000. That is something I am looking for.
I will attach image for better illustration.

When I have to produce a bar charts with values 20,30 it will not be the same height on first chart compare to chart 2 where values will be 20,10000
Thats what I need to point me to good direction with good resources or examples
To draw line chart it is not so simple as it looks like if you just join points. It will not work if your axis must be flexible you do not want to show for example bar charts with values of 20 and 30 where Y axis is max 100 then its easy what if your values will be 10,10000 in that case you want to have max value of Y axis set to 10000+ but your Y axis will be the same size as 100 so you need to calculate coordinates in that case point [10,10] will not be at the same location where Y is 100 than the same point where Y is 10000. That is something I am looking for.
I will attach image for better illustration.

When I have to produce a bar charts with values 20,30 it will not be the same height on first chart compare to chart 2 where values will be 20,10000
Thats what I need to point me to good direction with good resources or examples
Re: Pie,Line and Bar chart resources
Hi.
This is not as onerous as you would think. The trick is to adjust each graph according to the situation. So if you make a graph of fixed size, you know its height. Say it is 200 pixels, Now if you want to place a bar that shows, say, 5 out of 10, you would set your vertical scale from 1 to 10, and set the height of the bar to 100. But if you make a new scale that goes from 1 to 1000, the height of the bar does not change; it is still 100. What changes is the scale factor you use in your calculations.
So set up your graph, again perhaps 200 pixels high. Place the text field that will contain your vertical scale. Place your bar graphic. Now only the ratio of the bar value to the max value matters. So if you need 5 out of 10 (pseudo):
Now if you need 250 out of 1000 (pseudo):
Does this do it for you?
Craig
This is not as onerous as you would think. The trick is to adjust each graph according to the situation. So if you make a graph of fixed size, you know its height. Say it is 200 pixels, Now if you want to place a bar that shows, say, 5 out of 10, you would set your vertical scale from 1 to 10, and set the height of the bar to 100. But if you make a new scale that goes from 1 to 1000, the height of the bar does not change; it is still 100. What changes is the scale factor you use in your calculations.
So set up your graph, again perhaps 200 pixels high. Place the text field that will contain your vertical scale. Place your bar graphic. Now only the ratio of the bar value to the max value matters. So if you need 5 out of 10 (pseudo):
Code: Select all
get the ratio--5 / 10 = 0.5
set the height of graphic "barGraphic" to it * 200 -- height is 100
Code: Select all
get the ratio --250 / 1000 = 0.25
set the height of graphic "barGraphic" to it * 200 -- height is 50
Craig
Re: Pie,Line and Bar chart resources
Thanks that helps me.
If anyone is interested check my stack
If anyone is interested check my stack
- Attachments
-
- graph.zip
- (1.5 KiB) Downloaded 273 times