Talk:Charting Components API
From OpenLaszlo
on dataseries.getItem(index) - return LzDataNode representing the item from given column it is assuming different dataseries are from the same xml
User:Bloch - I'm confused. Why does this API call imply that?
We can't do this because of name conflict.
<dataseries>
<dataseriescolumn name="x" label="x" columndatapath="@x" />
<dataseriescolumn name="y" label="data1" columndatapath="@y1" />
<dataseriescolumn name="y" label="data2" columndatapath="@y2" />
</dataseries>
so we might want this instead:
<dataseries>
<dataseriescolumn columnname="x" label="x" columndatapath="@x" />
<dataseriescolumn columnname="y" label="data1" columndatapath="@y1" />
<dataseriescolumn columnname="y" label="data2" columndatapath="@y2" />
</dataseries>
The example below has 2 dataseries.
<dataseries>
<dataseriescolumn name="gender" columndatapath="@gender" />
<dataseries label="age" >
<dataseriescolumn name="y" columndatapath="@age" />
<dataseriescolumn name="tip" columndatapath="@age-tip" />
</dataseries>
<dataseries label="years-of-school">
<dataseriescolumn name="y" columndatapath="@school" />
<dataseriescolumn name="tip" columndatapath="@yos-summary" />
</dataseries>
</dataseries>
I plan to add the following method to the dataseries class to make it easier to retrieve leaf dataseries
<method name="getNumDataSeries"> //get the Number of leaf dataseries
</method>
<method name="getDataSeries" args="index"> //get the leaf dataseries of that index
</method>
Questions / responses: 5/4/2005
What is the attribute enabled? If it's false, is the dataseries hidden?
Enable is to show or not show the dataseries in the plotarea. So when the code for the legend is done. Click on the legend item will toggle the enable attribute to true or false. And that will show or not show the dataseries in the plotarea.
Is it a boolean?
enable is an expression that can be evaluate to boolean value of true or false.
What is the default value (I presume it's true)?
Yes the default is true
What is the attribute style? Is it chartstyle? Is there a default style?
Yes it is chartstyle. It is not implemented yet. There will be a default style.
What is type="html"? Does it mean that I can put html tag around the text, e.g. Data Series.
* Not positive, I think you can put html tag such as “<xx>” around it. I will check on it.
Where are the dataseries labels displayed (in the legion?)?
Yes, they are text in legend item
How can I associate custom labels for tick labels? Is labeldatapath the way to do it? If yes, please give me some sample code.
* will check on it
What is intervaltype (linear or categorical)?
Yes, they are text in legend item The series data can be linear(number, date) or categorical(text such as apple, orange and so on.)
4. How can I set background color for the chart and what is the default?
* <linechart bgcolor=”red”> should do it. I need to look in it little more for the bgcolor of plotarea.
5. What is the attribute "resource" in class plotarea? Is it the name of the resource that will be rendered in the background of plotarea?
Yes it is the resource(image) for the background of the plotarea. It is not currently implemented yet.
6. Can the legend be extended to have custom view for each dataseries label? For example, I want to have each row in the legend to have the following:
checkbox] [datasereis label] [imagebutton]
Also, how can I specify the location (left, top, right, bottom) of the legend relative to the chartarea? We will likely to place legend to the left of the chartarea.
Would mouse over a dataseries label in the legend show all the data tips for the points in that dataseries? I saw this in the spike demo from alexsystem.com
* A more complex version of legend is currently being implement for the pie chart. I will check on that
8. How can I specify background color for chartregion?
Chartregion is not implemented yet. We will add a attribute called “color” to the API doc.

