changing graphic atributes

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
adventuresofgreg
Posts: 349
Joined: Tue Oct 28, 2008 1:23 am
Contact:

changing graphic atributes

Post by adventuresofgreg » Sat Dec 17, 2011 5:56 pm

Hi: I am plotting price data (O,H,L,C bars and indicators, etc) and I would like to find an easier way to change attributes of parts of the graphic (like line color, line size, etc). Currently, it is ONE graphic:

set the points of graphic "MyData" to pPoints

and then scale graphic "MyData" to fit into a frame. The only way to isolate parts of the graphic to change color, etc, is to make a copy of the MyData graphic, change the attributes of the copy and delete the points that aren't to be colored. This works, but I have scaling problems because the copied graphic with isolated data is not exactly the same as the original, and scaling to match the frame results in two differently scaled graphics and they don't overlay.

It would be convenient if there was some way to specify a change in attributes in the same graphic.

Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm

Re: changing graphic atributes

Post by Bernard » Tue Dec 20, 2011 11:03 am

I don't have an answer to your question (I rarely touch graphics).

However, there are two libraries available for Livecode which manipulate charts. I would have a look at them and see if what you are trying to do is doable. Then you have the choice to pony up, or become an expert yourself in that area of Livecode :)

http://www.runrev.com/store/product/chartmaker/

http://www.runrev.com/store/product/cha ... ine-1-0-4/

In almost every case where there's a library available, I choose to go that route. I bought the latter (I already had the Animation Engine by the same author, and liked what I could do using it).

adventuresofgreg
Posts: 349
Joined: Tue Oct 28, 2008 1:23 am
Contact:

Re: changing graphic atributes

Post by adventuresofgreg » Tue Dec 20, 2011 3:57 pm

Thanks. I use ChartsEngine, but it doesnt plot a price bar. So I wrote my own - and figured out a way to change the color within the plot.
Attachments
plot.jpg
HLOC plot

Post Reply