I have a script which uses jqPlot and it has worked for years. Recently I had problems with the script having a mix of .live(), .bind() and .delegate() methods of attaching event handlers and so I upgraded to jquery-1.10.2 and changed all of the bindings to .on() method. Now everything is working fine except that when the script calls jqPlot I get the warnings:
Uncaught TypeError: Cannot read property 'msie' of undefined
Uncaught TypeError: Cannot read property 'highlightCanvas' of undefined
I do not know how to find out what version of jqPlot on my server so I have downloaded the latest version 1.0.8r1250 and used that version but the problem remains.
The call to jqPlot that isn't working is:
- this.myChart = $.jqplot('chart', $mt.jqPlotArray, {
- stackSeries: false,
- highlighter: {
- lineWidthAdjust: 2.5,
- // pixels to add to the size line stroking the data point marker
- sizeAdjust: 5,
- // pixels to add to the size of filled markers when drawing highlight.
- showTooltip: false,
- // show a tooltip with data point values.
- tooltipLocation: 'nw',
- // location of tooltip: n, ne, e, se, s, sw, w, nw.
- fadeTooltip: true,
- // use fade effect to show/hide tooltip.
- tooltipFadeSpeed: "fast"
- },
- legend: {
- show: true,
- location: 'nw'
- },
- seriesDefaults: {
- fill: true,
- showMarker: false
- },
- series: [{
- label: 'Landscape',
- fillToZero: false,
- color: '#996633'
- }, {
- label: 'Fresnel Zone',
- fill: false,
- showMarker: false,
- lineWidth: 1,
- renderer: $.jqplot.LineRenderer,
- fillToZero: false,
- color: "#333"
- }, {
- label: 'Fresnel Zone',
- fill: false,
- showMarker: false,
- lineWidth: 1,
- renderer: $.jqplot.LineRenderer,
- fillToZero: false,
- color: "#333"
- }, {
- label: 'Line Of Sight',
- fill: false,
- showMarker: false,
- renderer: $.jqplot.LineRenderer,
- fillToZero: false,
- color: $mt.defaultStyle.strokeColor
- }],
- cursor: {
- showTooltip: false,
- followMouse: true,
- showTooltipDataPosition: false,
- zoom: true,
- intersectionThreshold: 6,
- tooltipFormatString: 'Height:%s'
- },
- axesDefaults: {
- labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
- tickRenderer: $.jqplot.CanvasAxisTickRenderer
- },
- axes: {
- xaxis: {
- label: 'Distance (km)',
- min: 0,
- // max: $mt.distance
- max: $mt.distance + $mt.distanceBuffer
- // pad: 0.15
- },
- yaxis: {
- // label: 'Height (m)',
- max: $mt.jqPlotMax + $mt.jqPlotBuffer
- }
- }
- });
I would be extremely grateful for any help with this