I want to draw stock price in real time as a candle graph. I get ope开发者_开发百科n flash chart from someone and it looks good at drawing. I don't know how to update the candle graph in real time (using Ajax?), and is it a good way?
I use Python a lot. But I cannot find tools as easily to use as OFC.
I would move away from Flash if you can (I am a flash developer). Try a Javascript Library like which will work on things like the iPhone, iPad, Macbook Air. HTML5 devices. http://raphaeljs.com/
Some simple charts here http://raphaeljs.com/chart.html
http://www.jqplot.com/ should be great solution for you
In Open Flash Chart there is a candle.txt file that is the template for just this kind of chart.
Open Flash Chart Rules! (and I dislike Flash)
{
"title":{
"text": "Candle",
"style": "{font-size: 20px; color:#0000ff; font-family: Verdana; text-align: center;}"
},
"y_legend":{
"text": "Open Flash Chart",
"style": "{color: #736AFF; font-size: 12px;}"
},
"elements":[
{
"type": "candle",
"alpha": 0.5,
"colour": "#40d040",
"negative-colour": "#d04040",
"text": "Burn baby, burn",
"font-size": 10,
"on-show": {"type": "po-p", "cascade":1, "delay":0},
"tip": "#x_label#<br>High: #high#<br>Open: #open#<br>Close: #close#<br>Low: #low#",
"values" : [
{"high":19, "top":14, "bottom":11, "low":10, "tip":"LOOK<br>#top#,#bottom# = #val#"},
{"high":15, "top":10, "bottom":5, "low":0},
{"high":7, "top":7, "bottom":4, "low":3},
{"high":7, "top":3, "bottom":6, "low":2},
{"high":7, "top":4, "bottom":4, "low":2}
]
}
],
"x_axis":{
"labels": ["January","February","March"]
},
"y_axis":{
"max": 20
}
}
精彩评论