diff --git a/js/tbl_select.js b/js/tbl_select.js index 50a362d3d6..ecb1ae6851 100644 --- a/js/tbl_select.js +++ b/js/tbl_select.js @@ -32,6 +32,14 @@ $(document).ready(function() { $('#tableid_1').change(function() { $('#zoom_search_form').submit(); }) + + $('#tableid_2').change(function() { + $('#zoom_search_form').submit(); + }) + + $('#tableid_3').change(function() { + $('#zoom_search_form').submit(); + }) /** @@ -79,7 +87,6 @@ $(document).ready(function() { // found results $("#sqlqueryresults").html(response); $("#sqlqueryresults").trigger('appendAnchor'); - $("#sqlqueryresults").trigger('makegrid'); $('#tbl_search_form') // work around for bug #3168569 - Issue on toggling the "Hide search criteria" in chrome. .slideToggle() diff --git a/js/tbl_zoom_plot.js b/js/tbl_zoom_plot.js index 5ade2a5224..b5c2555b21 100644 --- a/js/tbl_zoom_plot.js +++ b/js/tbl_zoom_plot.js @@ -3,6 +3,10 @@ var chart_series; var chart_series_index = -1; $(document).ready(function() { + + + + var currentChart=null; // Get query result @@ -12,11 +16,11 @@ $(document).ready(function() { var currentSettings = { chart: { - renderTo: 'resizer', + renderTo: 'querychart', defaultSeriesType: 'scatter', zoomType: 'xy', - width:$('#resizer').width()-20, - height:$('#resizer').height()-20 + width:$('#resizer').width(), + height:$('#resizer').height() }, xAxis: { title: { text: $('#tableid_0').val() }, @@ -24,13 +28,17 @@ $(document).ready(function() { yAxis: { title: { text: $('#tableid_1').val() }, }, - title: { text: 'Scatter Plot' }, + title: { text: 'Query Results' }, + exporting: { enabled: false }, + credits: { + enabled: false + }, label: { text: $('#dataLabel').val() }, } function drawChart(noAnimation) { - currentSettings.chart.width=$('#resizer').width()-20; + currentSettings.chart.width=$('#resizer').width()-3; currentSettings.chart.height=$('#resizer').height()-20; if(currentChart!=null) currentChart.destroy(); @@ -39,9 +47,25 @@ $(document).ready(function() { currentChart = PMA_queryChart(chart_data,currentSettings); if(noAnimation) currentSettings.plotOptions.series.animation = true; } + + $('#resizer').resizable({ + resize: function() { + currentChart.setSize( + this.offsetWidth -3, + this.offsetHeight - 20, + false + ); + } + }); + drawChart(); }); +function displayHelp() { + alert("* Each point represents a data row.\n* Hovering over a point will show its label.\n* Drag and select an area in the plot to zoom into it.\n* Click reset zoom link to come back to original state.\n* Click data points to view the data row.\n* The plot can be resized by dragging it along the bottom right corner."); + +} + function in_array(element,array) { for(var i=0; i $inputs[0], 'yLabel' => $inputs[1], 'dataLabel' => $dataLabel); $result = PMA_DBI_query( $sql_query . ";" , null, PMA_DBI_QUERY_STORE); @@ -150,23 +152,33 @@ if(isset($zoom_submit)) {
- - - - - - + +
+ +"; + } + ?>
"; + echo __("Additional search criteria"); + echo "