I am running the lineChart gadget example which makes use of the visualization framework on the gadget server. It runs fine with data being displayed every second. I want to change the color of the line but I cannot find any method inside the gadget code which can set the line color. In the following piece of code you can set some properties.
window.onload = function () {
var lineChart = new wso2vis.s.chart.protovis.LineChart("chart","MNT-Lab : LabVIEW Simulation","");
lineChart.dataField(["Response", "Terminal"])
.dataValue(["Value"])
.dataLabel(["Name"])
.width(380)
.height(300)
.band(50)
.legend(true)
.marks(true)
.dirFromLeft(true)
.xSuffix("s");
But i am a bit confused on how and where the default color of the line is being set. I have looked inside the wso2vis.js file but cannot see any methods to change the color.
WSO2Vis.js is renamed to viskit.js and is now hosted at GitHub [1]. for your question you can change the rgba values in [2].
Regards, Nuwan
[1] http://wso2.github.com/viskit/ [2] https://github.com/wso2/viskit/blob/master/js/subscriber/chart/protovis/LineChart.js