I’m getting an error when trying to make a chart:
26900Uncaught TypeError: this.s.value is not a function with the below code. It seems to be connected with the data, but no idea why. Any suggestions are appreciated.
…
var chart_data = [{"buckets":-8.9219913483,"0":0.0041742643},{"buckets":-7.0791976929,"0":0.0104356606},{"buckets":-5.2364040375,"0":0.0146099249},{"buckets":-3.3936103821,"0":0.0438297747},{"buckets":-1.5508167267,"0":0.2358459306},{"buckets":0.2919769287,"0":0.1836676274},{"buckets":2.1347705841,"0":0.0333941141},{"buckets":3.9775642395,"0":0.0104356606},{"buckets":5.8203578949,"0":0.0020871321},{"buckets":7.6631515503,"0":0.0041742643},{"buckets":9.5059452057,"0":0}] ;
…
dtable = new webix.ui({
type: “line”,
height: 500,
container: “webix_container1”,
rows: [
{
view: "datatable",
columns: [
{id: "Date", header: "Date", sort: "string", fillspace: false},
{id: "0", header: "0", sort: "string", fillspace: false}
],
scheme: {
$init: function (obj) {
obj.index = this.count();
}
},
data: pnl_results
},
{
view:"chart",
type:"splineArea",
value:"#0#",
color:"#36abee",
alpha:0.6,
border:true,
xAxis:{
template:"'#buckets#"
},
yAxis:{
start:0,
end:1,
step:0.1
},
data: chart_data
},
{
view: "button", value: "Export to Excel", click: function () {
webix.toExcel($$("datatable"))}
}
]
});
webix.toExcel($$("datatable1"), {
filename: "table", // for filename
name: "Films" // for sheet name
});