Rank: Member
Groups: Registered
Joined: 10/22/2012(UTC) Posts: 12
Thanks: 2 times Was thanked: 0 time(s) in 0 post(s)
|
Ivan wrote:Can you provide us your code, so we can look at this? I'm trying reproducing this issue, but in my test it looks ok. Here is some completely butchered code, but it demonstrates the y-axis title/label overlap problem. Normally the source data and other chart details are fetched from the server but I've hard-coded it all here. Also, please note another bug when "logrithmic:true," is uncommented: The chart is drawn correctly but the data points are not present, nor does mouseover work. Code: <html> <head> <link rel="stylesheet" type="text/css" media="screen" href="/static/jquery/ui/css/custom-theme/jquery-ui-1.8.20.custom.css" /> <style>html, body { margin: 0; padding: 0; font-size: 75%; background-color:inherit; color:white; height: 100%; width: 1190px; } .ui-jqchart { position: relative; } .ui-jqchart .ui-jqchart-tooltip { font-family: Segoe UI, Arial, sans-serif; position: absolute; white-space: nowrap; padding: .2em .4em; z-index: 9999; border: 1px solid #dddddd; color: #333333; background: white; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; -o-box-shadow: 0 0 5px #aaa; -moz-box-shadow: 0 0 5px #aaa; -webkit-box-shadow: 0 0 5px #aaa; box-shadow: 0 0 5px #aaa; } * html .ui-jqchart .ui-jqchart-tooltip { background-image: none; } body .ui-jqchart .ui-jqchart-tooltip { border-width: 2px; } </style> <script src="/static/jquery/1.8/jquery-1.8.0.min.js" type="text/javascript"></script> <script src="/static/jquery/jqchart/js/jquery.jqChart.min.js" type="text/javascript"></script> <script src="/static/jquery/ui/js/jquery-ui-1.8.20.custom.min.js" type="text/javascript"></script> <script type="text/javascript">
function formatToolTip() { return '<b>' + this.x + '<b>: ' + this.y + ' '; } function formatLabels() { return '<b>' + this.point.x + '<b>: ' + this.y + ' '; }
var line_data = [];
function build_data() { dataset1 = new Array(); datapoint = new Array(); datapoint.push(new Date('Thu Sep 27 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(38); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Fri Sep 28 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(14); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Sat Sep 29 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(438); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Sun Sep 30 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(440); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Mon Oct 01 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(537); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Tue Oct 02 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(533); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Wed Oct 03 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(534); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Thu Oct 04 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(636); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Fri Oct 05 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(738); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Sat Oct 06 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(838); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Sun Oct 07 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(887); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Mon Oct 08 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(916); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Tue Oct 09 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(937); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Wed Oct 10 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(1041); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Fri Oct 19 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(1203); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Sat Oct 20 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(1241); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Sun Oct 21 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(1344); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Mon Oct 22 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(1439); dataset1.push(datapoint); datapoint = new Array(); datapoint.push(new Date('Tue Oct 23 2012 00:00:00 GMT+0100 (GMT Summer Time)')); datapoint.push(1726); dataset1.push(datapoint);
series1={"data": dataset1, "markers":{"size": 3}, "title": "Series 1", "type":"Line", } line_data.push(series1); update_chart(); }
function update_chart() { $('#chart').jqChart({ title: get_title_theme(), animation: animation_theme, height: 600, width: 1000, background: background_theme, legend: legend_theme, axes: [ {type: 'dateTime', location: 'bottom', strokeStyle: '#AAAAAA', majorTickMarks: {strokeStyle: '#AAAAAA'}, labels: {strokeStyle: undefined, fillStyle: '#AAAAAA', angle: -30, hoursIntervalStringFormat: 'mmm d HH:MM', daysIntervalStringFormat: 'd mmmm yyyy', weeksIntervalStringFormat: 'd mmmm yyyy', monthsIntervalStringFormat: 'mmmm yyyy', yearsIntervalStringFormat: 'yyyy'}}, {type: 'linear', lineWidth: 0, location: 'left',
//logarithmic: true,
reversed: true,
majorTickMarks: {lineWidth: 0}, minorGridLines: {lineWidth: 1}, labels: {strokeStyle: undefined, fillStyle : '#AAAAAA', lineWidth: 1}, title: {text: 'Axis Label Here', strokeStyle: undefined, fillStyle: '#AAAAAA'}}], paletteColors : palette_theme, watermark: watermark_theme, series: line_data, tooltips: {background: 'white'} }); $('#chart').bind('tooltipFormat', function (e, data) { var tooltip = '<span style="font-size:150%;"><span style="color:'+data.series.fillStyle+';">'+data.series.title+': </span><span style="color:black;">' + data.y + '</span></span>'; return tooltip; }); }
function get_title_theme(){ return { text: 'Sample chart', strokeStyle: undefined, font: '15px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif', fillStyle: 'white', lineWidth: 1 }; } var animation_theme = { delayTime: 0, duration: 0.1 }; var background_theme = { type: 'linearGradient', x0: 0, y0: 0, x1: 0, y1: 1, colorStops: [{offset:0, color: '#606060'}, {offset:1, color: '#101010'}] }; var legend_theme = { visible: true, font: '12px sans-serif', textFillStyle: 'white', textStrokeStyle: undefined, textLineWidth: 1, background: 'black', border: { lineWidth: 1, strokeStyle: 'white' } }; var palette_theme = { type: 'customColors', customColors: ['#960B59', '#E2188B', '#C4488C', '#F067A6', '#F179AF', '#F49CC4', '#E70379', '#F067A6', '#A71D67', '#FF56AA', '#800244', '#FEAFD7', '#FE83C4', '#FF2BAD', '#FF72E7', '#FF60A0', '#FF91DC', '#FF7595'] }; var watermark_theme = { text: 'www.companywebsite.com', fillStyle: 'rgba(255,255,255,0.5)', font: '14px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif', hAlign: 'right', vAlign: 'bottom' };
$(document).ready(function() { build_data(); }); </script> </head> <body> <div id="chart"></div> </body> </html>
|