Topic: Documentation for Charts
waynefulcher pro asked 6 years ago
- Hide labels above Pie Chart but allow tooltip to popover when hovering.
- Since I have an area where I need to make my Pie Chart really small the tooltip popovers when hovering are being paritally hidden because it is wider than the frame the chart is in. So I need to either make the z-index for the tooltip higher or turn them off.
Piotr Glejzer staff answered 6 years ago
options: { responsive:true, legend:false }
options: { responsive:true, legend:false, tooltips:{ bodyFontSize:12 //default }
Ward Y answered 6 years ago
Piotr Glejzer staff commented 6 years ago
Hi, do you mean specific data from data from a server to change for the chart? Best, PiotrWard Y answered 6 years ago
var dataSource = new kendo.data.DataSource({ transport: { read: { // the remote service url url: "http://api.openweathermap.org/data/2.5/find", // the request type type: "get", // the data type of the returned result dataType: "json", // additional custom parameters sent to the remote service data: { lat: 42.42, lon: 23.20, cnt: 10 } } }, // describe the result format schema: { // the data, which the data source will be bound to is in the "list" field of the response data: "list" } }); If you can explain how to get up to date (real-time) information into mdbootstrap charts, that'd be very useful to me and I will become a PRO customer because that's really necessary and, yet, it seems like your charts examples are all using static data that's hard coded in the html page. Am I wrong? Am I missing something fundamental? Thanks and best regards, Ward
Ward Y answered 6 years ago
<html> <head> <!--Load the AJAX API--> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script type="text/javascript"> // Load the Visualization API and the piechart package. google.charts.load('current', {'packages':['corechart']}); // Set a callback to run when the Google Visualization API is loaded. google.charts.setOnLoadCallback(drawChart); function drawChart() { var jsonData = $.ajax({ url: "getData.php", dataType: "json", async: false }).responseText; // Create our data table out of JSON data loaded from server. var data = new google.visualization.DataTable(jsonData); // Instantiate and draw our chart, passing in some options. var chart = new google.visualization.PieChart(document.getElementById('chart_div')); chart.draw(data, {width: 400, height: 240}); } </script> </head> <body> <!--Div that will hold the pie chart--> <div id="chart_div"></div> </body> </html>
Ward Y answered 6 years ago
Piotr Glejzer staff answered 6 years ago
Ward Y commented 6 years ago
Hi Piotr, "You have to connect you chart with adress URL." That's what I've been asking. The examples were just to answer a question you placed to me. I would like to issue a https REST based query to fetch the data, including the column names. If it has to be SQL that's perfectly fine. Please tell me the syntax or at least reply with an example(s), because it's not documented and there's no example. I am sure other people would like to know this because it's quite necessary to deploy any application that uses your charts. Also, I am new to your product line, and I would have to say my real interest is in Bootstrap not JQuery. Will your suggestion work for the Bootstrap implementation? Can you make your example/sample be for Bootstrap, if it's different than JQuery. Thanks, WardPiotr Glejzer staff answered 6 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.5.9
- Device: PC
- Browser: all
- OS: Windows 10
- Provided sample code: No
- Provided link: No