java - Line Chart Slider Implementation using google visualisation dashboard and controls -
I am facing problem while applying slider control using the Google Visualization Conrad. I have implemented the number range filter as a control cover. I have the following column figures.
var dataTable = google.visualization.arrayToDataTable ([['' year '' '' 'Australia' '' ''], [2004, 1000, 400], [2005, 1170, 460] [2006, 660, 1120], [2007, 1030, 540] [2008, 1030, 540]]);All column number types are there. When this drawing is appearing in the X Axis data number format, the reference was found and corrected.
Here my code:
var dashboard = new google.visualization.dashboard (document.getElementById ('dashboard_div')); ('' Filter '' '' option ': {' filter column ': 1,' width ':' 100% ',' UI ': {' LabelStacking ':' horizontal ',' format ': {' pattern ' : '####', 'fractionDigits': '0', 'grouped symbol': '', 'shorange value': true}}},}); // Create a line chart, passing some options. LineChart = New Google.visualization.ChartWrapper ('Chart Type': 'Sketch,' 'Container ID': 'Chart_div', 'Options': {'width': 900, 'height': 500, 'FontSize': 11, '' HXIS '': 'true', 'direction': '1', 'format': {'pattern': '0'}}, 'hxis.gridline.color': '# ccc', ' 'HAxis': {gridlines: {color: 'transparent'}}}}); Dashboard Bind (Salirezslider, Linechart); Var dataViewNew = new google.visualization.DataView (DataTable); DataViewNew.setColumns ([{calc: function (data, line) {return data. GetFormattedValue (line, 0);}, type: 'string'}, 0,1]); Dashboard.draw (dataViewNew);
In this code I have added a new column of type string in Dotter.
var dataViewNew = new google.visualization.DataView (dataTable); DataViewNew.setColumns ([{calc: function (data, line) {return data. GetFormattedValue (line, 0);}, type: 'string'}, 0,1]);
Now the datagram is in this way. ['2005', 2005, 1170, 460] ['Year', 'Australia', 'China'], ['2006', 2006, 660, 1120], ['2007', 2007, 1030, 540] '2008', 2008, 1030, 540]
After drawing here the charts come in the x axis string format but a new column is added to the legend. Please suggest how to remove the new column from legend.
< / Html>
Comments
Post a Comment