griffo

candlestick chart not displaying

Recommended Posts

hello,

I have been using the candlestick chart in laszlo, which works fine with up to 16 candles, but if i add more then the chart does not display. The charts in the examples have up to 30 candles. I will potentially be displaying over 100 candles in a chart.

Does anyone know why this does not work when more than 16 cnadles are added?

I have added code below, with a dataset that should work. There are some commented set nodes which if uncommented the chart will not display.

thanks

griffo

<canvas debug="true">

<dataset name="fusionChartDS2">

<chart numPDivLines="5" labelDisplay='ROTATE' caption="XYZ - 3 Months"  PYAxisName="Expression Level"  >

<categories>

 <category label="TPB2008020401Aaa.CEL" x="1"/>

 <category label="TPB2008020402Aaa.CEL" x="2"/>

 <category label="TPB2008020404Aaa.CEL" x="3"/>

 <category label="TPB2008020405Aaa.CEL" x="4"/>

 <category label="TPB2008020409Aaa.CEL" x="5"/>

 <category label="TPB2008020418Aaa.CEL" x="6"/>

 <category label="TPB2008020419Aaa.CEL" x="7"/>

 <category label="TPB2008020420Aaa.CEL" x="8"/>

 <category label="TPB2008021102Aaa.CEL" x="9"/>

 <category label="TPB2008021115Aaa.CEL" x="10"/>

 <category label="TPB2008021118Aaa.CEL" x="11"/>

 <category label="TPB2008021120Aaa.CEL" x="12"/>

 <category label="TPB2008020403Aaa.CEL" x="13"/>

 <category label="TPB2008020406Aaa.CEL" x="14"/>

 <category label="TPB2008020407Aaa.CEL" x="15"/>

 <category label="TPB2008020408Aaa.CEL" x="16"/>

 

 

</categories>

<dataset seriesName="T" color="CD5555">

 <set low="40" open="153"  close="704" high="1530" x="1" color="CD5555"/>

 <set low="47" open="165"  close="651" high="1380" x="2" color="CD5555"/>

 <set low="46" open="147"  close="590" high="1254" x="3" color="CD5555"/>

 <set low="47" open="131"  close="539" high="1151" x="4" color="CD5555"/>

 <set low="48" open="155"  close="613" high="1300" x="5" color="CD5555"/>

 <set low="46" open="131"  close="558" high="1198" x="6" color="CD5555"/>

 <set low="50" open="157"  close="700" high="1514" x="7" color="CD5555"/>

 <set low="51" open="169"  close="740" high="1596" x="8" color="CD5555"/>

 <set low="40" open="149"  close="678" high="1471" x="9" color="CD5555"/>

 <set low="48" open="162"  close="716" high="1547" x="10" color="CD5555"/>

 <set low="48" open="155"  close="704" high="1527" x="11" color="CD5555"/>

 <set low="48" open="186" close="775" high="1658" x="12" color="CD5555"/>

 

</dataset> 

 

<dataset seriesName="C" color="FF6600">

 <set low="35" open="158"  close="660" high="1413" x="13" color="FF6600"/>

 <set low="48" open="168" valuetext="Median-295" close="634" high="1333" x="14" color="FF6600"/>

 <set low="52" open="177" valuetext="Median-311" close="677" high="1427" x="15" color="FF6600"/>

 <set low="45" open="156" valuetext="Median-282" close="652" high="1396" x="16" color="FF6600"/>

<!-- if add these extra sets then the chart does not display: 

 <set low="45" open="154" valuetext="Median-288" close="677" high="1461" x="17" color="FF6600"/>

 <set low="43" open="147" valuetext="Median-256" close="567" high="1197" x="18" color="FF6600"/>

 <set low="44" open="140" valuetext="Median-246" close="548" high="1160" x="19" color="FF6600"/>

 <set low="46" open="160" valuetext="Median-325" close="798" high="1755" x="20" color="FF6600"/>

 <set low="40" open="165" valuetext="Median-315" close="742" high="1607" x="21" color="FF6600"/>-->

</dataset>

 </chart>

</dataset>

<class name="FusionChart" resource="empty">

  <attribute name="chartDataset" value="null"/>

  <attribute name="chartSwf" value="null" type="string"/>

  <attribute name="protectStage" value="false" type="boolean"/>

  <handler name="oninit">

  this.loadChart();

  </handler>

 

  <method name="loadChart">

  var mc = this.getMCRef();

  mc._lockroot = true;

  var p = new LzParam();

  p.addValue("dataXML", this.chartDataset.childNodes[0].serialize(), true);

  p.addValue("chartWidth", this.width);

  p.addValue("chartHeight", this.height);

  if (this.protectStage)

  p.addValue("Stage", null);

  mc.loadMovie(this.chartSwf + "?" + p.toString());

Debug.write("should have created chart");

  </method>

</class>

 <simplelayout axis="y" spacing="20"></simplelayout>

<view width="80%" clip="true">

<view  >

<FusionChart id="chart1"

align="center"

valign="top"

width="1000"

height="400"

protectStage="true"

chartDataset="fusionChartDS2"

chartSwf="../../FusionCharts/CandleStick.swf"/>

</view>

<hscrollbar/>

</view>

</canvas>

Share this post


Link to post
Share on other sites

Can you switch the debug mode of chart to on to see if the entire XML data is being passed to chart (in case of 100 candles)?

Share this post


Link to post
Share on other sites

Hi Pallav,

 

 

 

again the debugger only displays when there are 16 or fewer candlesticks. When there are more there is just a blank screen, no error messages are displayed.

 

 

 

This is the infor from the debugger window when there are 16 candlesticks:

 

 

 

Info: Chart loaded and initialized.

 

Initial Width: 700

 

Initial Height: 400

 

Scale Mode: noScale

 

Debug Mode: Yes

 

Application Message Language: EN

 

Version: 3.0.3

 

Chart Type: Candle Stick Chart

 

Chart Objects:

 

BACKGROUND

 

CANVAS

 

CAPTION

 

SUBCAPTION

 

PYAXISNAME

 

VYAXISNAME

 

DIVLINES

 

YAXISVALUES

 

HGRID

 

DATALABELS

 

DATAVALUES

 

TRENDLINES

 

TRENDVALUES

 

VTRENDLINES

 

VTRENDVALUES

 

PRICEPLOT

 

VOLUMEPLOT

 

TRENDSETS

 

ANCHORS

 

TOOLTIP

 

VLINES

 

LEGEND

 

 

 

INFO: XML Data provided using dataXML method.

 

XML Data:

Share this post


Link to post
Share on other sites
Guest Angie

Dear User,

 

We are delighted to announce that PowerCharts is now ready for your iPads and iPhones too. We have just released PowerCharts v3.2. Starting v3.2, PowerCharts has HighCharts embedded within it, and offers both Flash and JavaScript (HTML5) charting . The Flash charts are displayed on a majority of devices and the JavaScript charts on devices that do not support Flash, all of it without writing a line of code.

 

Automatic rendering of JavaScript charts on devices (like iPad and iPhone) where Flash player is not supported.

 

5 new chart types:

 

Heat Map Chart

 

Box and Whisker Chart

 

Step Line Chart

 

Error Line Chart

 

Error Scatter Chart

 

 

* Support for JSON data format.

 

* Support for LinkedCharts, where a single data source controls multiple charts.

 

* Interactive legends in charts allow selective showing/hiding of data series.

 

* Legends now support icons for each data series.

 

* Better management of labels on charts.

 

* Labels now have an auto rendering mode to prevent them from overlapping, the chart selects the best display mode depending on the length of the labels and the width of the chart.

 

* Long labels are truncated, with ellipses appended to the truncated end of each label, and a tooltip bearing the completed label text is displayed when the user hovers over a truncated label.

 

* Support for line breaks and wrapping in all text elements including: caption, sub caption, X-axis title, Y-axis title, Labels and tooltips.

 

* In Line charts, data values can now be positioned either above or below the dataplots. Automatic positioning of data values is also supported.

 

* In Step-line charts dataplots can be joined using vertical lines.

 

* Custom alignment of caption and sub caption using STYLES.

 

* Advanced print management using JavaScript.

 

* Additional options for efficient event handling using JavaScript.

 

* Support for dynamic update of chart properties using JavaScript(barring select scatter and drag charts).

 

* Charts now support % based sizes along with dynamic resizing (barring select scatter and drag charts).

 

 

Learn more about everything new in PowerCharts v3.2 at : http:/ www.fusioncharts.com/PowerCharts/

 

We would love to hear from you at: http://www.fusioncharts.com/contact/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now