WseChart - widget to create charts for companies on Warsaw Stock Exchange

For one of my personal projects I needed a chart of stock value for one of public companies in Poland. Unfortunately, I wasn't able to find anything useful (and free), so I've decided to build it myself. It's available as a widget you could add to your own website. Live demo is available here.

The widget in its current version uses daily data in Metastock format, downloaded automatically everyday at 6:01 pm Polish time from Bossa.pl. You will need to know exact ticker from files published there.

Widget uses JQuery, Raphael and Morris.js JavaScript libraries.

To use, you must:

  • load required libraries
  • load wsechart code with parameters (described below), for example:
    <script src="http://files.klimek.ws/WseChart/wsechart.php/PZU/a/gpwchart" type="application/javascript"></script>
  • create a div, set its id and size (using CSS or "style" attribute), for example: <div id="gpwchart" style="width:500px; height:200px;"/>

wsechart.php generates JavaScript code that draws the chart. I takes three arguments: TICKER, KEY (unused but can't be null) and DIVID. Usage:
http://files.klimek.ws/WseChart/wsechart.php/TICKER/KEY/DIVID
where:

  • TICKER is a ticker of stock you want to draw - it must be exact the same as in files from Bossa
  • KEY - unused, can't be null
  • DIVID - ID of DIV into which the chart will be injected

In case of error, wsechart.php will return error status like 404 (ticker not found) or 403 (forbidden - probably validations failed).

Sample HTML code:

<html>
<head>
<script src="jquery.min.js" type="application/javascript"></script>
<script src="raphael.min.js" type="application/javascript"></script>
<script src="morris.min.js" type="application/javascript"></script>
<script src="http://files.klimek.ws/WseChart/wsechart.php/PZU/a/gpwchart" type="application/javascript"></script>
</head>
<body>
<div id="gpwchart" style="width:500px; height:200px;"/>
</body>
</html>

Category: 

Add new comment

Markdown

  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <small>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
By submitting this form, you accept the Mollom privacy policy.