Trying to use breakPoints with LinearAxisRenderer but no luck.. Any help?

218 views
Skip to first unread message

Arpit Agrawal

unread,
Feb 9, 2012, 2:18:32 AM2/9/12
to jqplot-users
Hi,

I am creating a plot using jqplot. Amazing library...

I want to skip some points form my x axis. Basically because I have
some gap in my data. Data for x axis is something like
[1,2,3,4,5,101,102,103,105] etc.
so I want the axis to break at 6 and start at 100. So I provided
breakpoint as under: But it is not working. Any idea why??



var updateplot=function(){
chart = $.jqplot('placeholder',mydata, {
title:Title,
seriesColors:['#0000A0'],
seriesDefaults:{
yaxis:'y2axis',
lineWidth:1,
shadow:false,
markerOptions:{
lineWidth:1,
size:0,
shadow:false,
color:'red'
}
},
axes:{
xaxis:{breakPoints:[6,101]}
},
highlighter: {
show: true,
showTooltip:false,
sizeAdjust: 4
},
cursor: {
style:'default',
show: true,
showTooltip:true,
followMouse:false,
tooltipLocation:'nw',
tooltipOffset:4,
userAxesFormatters:true,
tooltipFormatString:"%2$s,%3$s",
showTooltipDataPosition:true,
showVerticalLine:true,
zoom:false
},
grid:{
background:'white',
borderWidth:1.0,
shadow:false
},
canvasOverlay:overlay
});
updatetitle();
}


Arpit Agrawal

unread,
Feb 10, 2012, 3:15:57 AM2/10/12
to jqplot-users
Got the solution.
Simple two lines of code

chart.axes.xaxis.breakPoints=[10,100];
chart.replot();


thanks

Arpit Agrawal

unread,
Feb 15, 2012, 1:31:25 AM2/15/12
to jqplot-users
Hi Everyone...

Any way of implementing multiple breakPoints???

Reply all
Reply to author
Forward
Message has been deleted
0 new messages