Stock Quote & Chart Dashing Dashboard consists of two widgets. While one displays a stock's current quote and other details; another displays its last 30-days closing stock prices.
Add the gem to your dashing gemfile:
stock.sass into the
/widgets/stock directory and
chart.sass into the
/widgets/chart directory. Put the
yahoo_stock_quote.rb files in the
To use the widget, put the following codes into one of the
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1"> <div data-id="yahoo_stock_quote" data-view="Stock" data-prefix="$"></div> </li> <li data-row="1" data-col="1" data-sizex="3" data-sizey="1"> <div data-id="yahoo_stock_chart" data-view="Chart" data-prefix="$"></div> </li>
There are two jobs running for this dashboard, which are
yahoo_stock_quote.rb selects data from
yahoo.finance.quotes table, and
yahoo_stock_chart.rb retrieves data from
yahoo.finance.historicaldata table. You can change to another stock with the following line within the jobs.
symbol = "YHOO"