Rank: Advanced Member
Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered Joined: 1/3/2011(UTC) Posts: 483
Thanks: 0 times Was thanked: 87 time(s) in 87 post(s)
|
You can change your code to: Code: var seriesdata = [[new Date('04/18/2013 09:30'), 150]];
function getFirstSeries(seriesdata) { var first; first = { // title: ErdWeb.constants.config.bst[1].range2Title, type: 'verticalline', data: seriesdata, markers: { size: 10, type: 'rectangle', strokeStyle: '#0071C6', fillStyle: '#0071C6', lineWidth: 1 } }; return first; }
function getXAxis() { var x1 = { location: 'left', type: 'dateTime', labels: { stringFormat: 'mm/dd HH:MM' }, title: { text: 'Date/ Time', fillStyle: 'black' }, // intervalType: 'hours', // interval: 6, reversed: true, majorGridLines: { visible: false } }; return x1; }
function getYAxis() { var y1 = { location: 'bottom', type: 'linear', minimum: 0, maximum: 600, labels: { font: '9px sans-serif', intervalOffset: 0 }, majorTickMarks: { intervalOffset: 0 }, interval: 100, title: { text: 'Value', fillStyle: 'black' }, majorGridLines: { visible: false } }; return y1; }
var first = getFirstSeries(seriesdata);
var x1 = getXAxis(); var y1 = getYAxis();
$(document).ready(function () { $('#graph').jqChart({ paletteColors: { type: 'customColors', customColors: ['#0071C6', '#FFC300'] }, tooltips: { disabled: false }, border: { lineWidth: 0 }, axes: [x1, y1], series: [first] }); }); Best Regards, Dragan Matek jqChart Inc.
|