Jump to content
JChartFX Community

robert.gregor

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by robert.gregor

  1. Hello, I want to use axisY2 with jQuery. I am loading the data via ajax. Here is my code: function drawChart(divId, compId, range, type) { $.ajax({ url: "/", type: "get", 'cache' : false, data: "ServiceName=GetHistoryDataJson&deviceId="+compId+"&range="+range+"&"+Math.floor((Math.random()*100)+1), success: function(data) { var items = JSON.parse(data); divId.chart({ gallery:cfx.Gallery.Lines, dataValues: items, data: {series: 2}, dataSourceSettings: { fields: [{ name: "yData", displayName: chart_current, usage: cfx.FieldUsage.Value }, { name: "yDataExpected", displayName: chart_expected, usage: cfx.FieldUsage.Value }, { name: "xData", usage: cfx.FieldUsage.XValue}] }, allSeries: {MarkerShape: cfx.MarkerShape.None}, axisX: {LabelsFormat: {Format: cfx.AxisFormat.Date, CustomFormat:"HH:mm dd/MM/yy"}}, axisY: {DataFormat:Number, AutoScale: true }, axisY2: {DataFormat:Number, AutoScale: true }, }); } It is still displaying one axis x, where I have xData and one axis Y, where I have two data lines yData and yDataExpected. What I want is to have left main axisY populated with yData and then on the right axisY2, which will be populated with yDataExpected. How can I do it?
×
×
  • Create New...