w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
JqPlot - Does not show simple graph
i used this library too for a project, its really good!.. i just check the example that you post it and i found out what it was causing you an error, you only need to change the document.write sentence, if you use for example the console.log function it will work. ex. $(document).ready(function(){ console.log("It works!!!"); var plot1 = $.jqplot ('chart1', [[3,7,9,1,4,6,8,2,5]]); }); Another thing important is that this library uses jquery, so you will need to reference all the js files of jqplot after the jquery reference to avoid the JQuery no defined error. I hope it helps!

Categories : Javascript

How to define the size of graph in jqPlot
You can fix the size by configuring the height and width: $.jqplot('chartdiv', [data], { height: 400, width: 400, ... You also need to give the height and width to the target div: <div id="chartdiv" style="height:500px; width:500px;"></div>

Categories : Jquery

jqPlot line graph with gaps
According to jqPlot documentation about bar charts, you can specify : barWidth : z In the rendererOptions{} part. Where z represents the width of the bar in pixels. You can also specify barPadding and barMargin if you have several bars at the same axis value.

Categories : C#

How to break graph in line diagram of jqplot
You just have to give a point with null as the value of it. Inside series set breakOnNull: true. JSFIDDLE LINK $.jqplot.config.enablePlugins = true; var chartData = [[1, 224], [3, 672], [5, null],[15,2240],[17,2000]]; function PlotChart(chartData) { var plot2 = $.jqplot('chart1', [chartData], { title: 'Mouse Cursor Tracking', seriesDefaults: { renderer: $.jqplot.CanvasAxisLabelRenderer, rendererOptions: { smooth: true }, pointLabels: { show: true }, breakOnNull: true }, axes: { xaxis: { label: 'Number of Cookies', renderer: $.jqplot.CategoryAxisRenderer, // renderer to use to draw the axi

Categories : Jquery

jqPlot animate data change without reloading graph
This is how close i could get. You might want to remove the bar labels and keep only final values. JsFiddle link function myReplot() { var newdata = [[1,3],[2,6],[3,8],[4,11]]; plot1.series[1].data = newdata; plot1.replot(false); } $(document).ready(function(){ $.jqplot.config.enablePlugins = true; $("#button1").on("click",function(){ myReplot(); }); var data = [[2, 6, 7, 10],[0,0,0,0]]; var ticks = ['a', 'b', 'c', 'd']; plot1 = $.jqplot('chart1', data, { // Only animate if we're not using excanvas (not in IE 7 or IE 8).. stackSeries : true, animate: !$.jqplot.use_excanvas, //animateReplot: !$.jqplot.use_excanvas, seriesDefaults:{ renderer:$.jqplot.BarRenderer, pointLabels: { show: tr

Categories : Javascript

How to count data from a column in database which will have 3 different values and display it in Graph?
Replace COUNT with SUM, like this: SELECT SUM(CASE WHEN status='unpaid' THEN 1 ELSE 0 END) as Unpaid , SUM(CASE WHEN status='paid' THEN 1 ELSE 0 END) as Paid , SUM(CASE WHEN status='finished' THEN 1 ELSE 0 END) as Finished FROM monthlytracker WHERE ... -- the filter condition This will produce three columns with counts for each payment status.

Categories : C#

jqplot not display label of value on bar chart
This is because the leftmost bar is too near to the edge so the jqPlot will not render that. Try to increase the width. $jqplot('show-graph', [s1, s2, s3], { title: 'xxxx', width: 1000, .... }

Categories : PHP

How to display month name in x axis of JQPlot
You can do translation on javascript side using some kind of "int to month" translator : //Ticks you actually have var ticks = [1,2,3,4,5,6,7,8]; //Translator array to do conversion from integer to month var translator = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); for(var i = 0; i < ticks.length; ++i){ ticks[i] = translator[i]; } Ticks is now containing ["January", "February", "March", "April", "May", "June", "July", "August"]

Categories : Jquery

Using an existing neo4j graph database for quering instead of creating a new database (same) everytime
I am new in this, but I saw there is a Delete database method in several code. Perhaps this is your case. Try commenting out the delete database method o delete ir, and only use start and shutdown. I am trying to know how use a database without start and shutdown each time Java code run, perhaps with api REST. I have no answer yet, but I am still searching.

Categories : Neo4j

No SQL database or Graph database for data intensive application
A graph database is a NoSQL database, as is a document database, column-store database, and a key/value database. Regarding which one to choose: Unfortunately that cannot be answered so simply, as a lot will depend on your specific application. But... why choose one? Each type of NoSQL data store has its specific advantages. You can build a system based on multiple data stores, each one used to its specific advantage(s). This concept is known as polyglot persistence. The Microsoft Patterns & Practices team published guidance around this very topic, and I'd suggest reading through it. You can also check out the book NoSQL Distilled which also goes into this topic and the specifics of each data store classification. If you want to see an example of an app built on several data stores

Categories : Ruby On Rails

Facebook Graph API - retrieve basic information and additional variables
Your point is interesting. But /me only works as a shortcut to quickly get all basic fields at once. You have to override it. Don't call it twice, since API requests take some time. I advice you to make only one complete request by specifying all the fields you really need.

Categories : Facebook

How to represent a group of C++ dynamically allocated objects as a BGL (Boost Graph Library) graph in order to obtain their dependency graph?
The integers are indices to the vertices and edges of the graph. So, in your example, the first vertex is a and the second vertex is b while the first edge connects vertices 1 and 2 ( a and b ) Each vertex has properties. So, in your example, the first vertex is named a and has a pointer to a. The graph algorithms use the integer indices to manipulate the graph, and your code can use the indices to get back to the properties that you are interested in, such as names and pointers. Here is how I would code the example you posted: /** Bundled properties for graph vertices Simply contains a pointer to the associated MyObject */ class cVertex { public: MyObject * pObject; }; class cEdge { }; class cGraphProps { }; .... // The BGL graph typedef boost::adjacency_list <

Categories : C++

Display [Image][url] from Graph API
Basically you'll need to make a request with the Object id to get the desired image from Facebook Graph. So, after you assign $Object = $data['data']['object'] You can simply get the JSON from http://graph.facebook.com/$Object['id'] and to get the image. Example code: $facebookJSON = file_get_contents("https://graph.facebook.com/" . $Object['id']); $myArr = json_decode($facebookJSON, 1); $myImage = $myArr['image']['url']; $myImage will be the object image url. Good Luck, Guy.

Categories : PHP

Display a graph given (X,Y) tuple
See formal definition of tuple. By using a canvas and some javascript. There's plenty of libraries around for doing this already, but the canvas is easy to use and you should have no trouble drawing the lines in the colours and locations you need. Do use a library if you want the best looking/functioning output. Do learn how to do it yourself if you have other more highly valued aims.

Categories : Javascript

Display D3 graph with ember
This might not be a full solution, but following the example you mentioned I've refactored the code a little, so that it uses ember-data models. I've also updated all the js dependencies to the latest versions to proof that it still works. I guess you have now a better starting point on using ember-data's model together with d3 and still following ember's conventions. Have a look at this jsbin, you maybe find it useful. Edit Since you where asking for routes in your comments, see here another updated jsbin with routes. It still uses random values (for the sake of simplicity), but you can see the data changing by navigation trough the routes etc. Hope it helps.

Categories : Ember Js

how to only display the graph with highcharts
I have edit my anser as per your technology: set the background color to transparent and title to blank. $('#container').highcharts({ chart: { backgroundColor:'rgba(255, 255, 255, 0)', plotBorderWidth: null, plotShadow: false }, title: { text: '' }, Is is solve your problem?

Categories : Javascript

Display tooltip in Canvas graph
Short answer: as you've done it now, you can't. Long answer: you can, but you need to get the exact mouse position every 30milliseconds or so. For each millisecond, you must check if the mouse is hovering over the dot, re-draw the screen and show the tooltip if he's doing it. Doing so by yourself can be tedious, this is why I use gee.js. Check out this example: http://jsfiddle.net/Saturnix/Aexw4/ This is the expression which controls the mouse hovering: g.mouseX < x + r && g.mouseX > x -r && g.mouseY > y -r && g.mouseY < y+r

Categories : Javascript

Display time for one value in flot graph
You will need to make your tickSize be set to undefined in the case where there is only 1 value. Here's the relevant bit: var tickSize = [7,'day']; if (data7_1.length == 1 && data7_2.length == 1){ tickSize = undefined; } And then in the options, tickSize:tickSize. I made a working version of your fiddle: http://jsfiddle.net/AUrfY/11/

Categories : Javascript

MATLAB curve fit display equation on graph
Probably easiest to use the fit utility which is the non-graphical equivalent of using curvefit: % sample data x=[1:10]'; y = x+randn(10,1)*0.5; plot(x,y,'o') pars=fit(x,y,'poly1'); pars contains the result of the fit, which you can overlay on the plot above with hold on plot(pars) If you want to see the values of individual parameters, you can type pars.p1 or pars.p2 (for this example, there may be other parameters "pn" for other models) To display on the figure, you can do something simple like xpos=3; ypos=9; text(xpos,ypos,{num2str([pars.p1;pars.p2])}) For more info look into the documentation for curvefit or try help curvefit or help fit.

Categories : Matlab

Why do my dates not display on this graph (drupal, php, mysql)?
So I finally worked it out (complete fluke and don't understand the difference) but this is the final code that worked: <?php global $user; $uname = $user->uid; $sql = "SELECT concat(DAY(FROM_UNIXTIME(uc_orders.created)),'/',MONTH(FROM_UNIXTIME(uc_orders.created)),'/', YEAR(FROM_UNIXTIME(uc_orders.created))) as OrderDate, round(SUM(uc_order_products.cost * uc_order_products.qty),2) AS SellerCommission, round(SUM(uc_order_products.price * uc_order_products.qty),2) AS CustomerPrice FROM uc_order_products LEFT JOIN node node_uc_order_products ON uc_order_products.nid = node_uc_order_products.nid LEFT JOIN uc_orders uc_orders ON uc_order_products.order_id = uc_orders.order_id INNER JOIN users node_uc_order_products__users ON node_uc_order_products.uid = node_uc_order_products__us

Categories : PHP

matplotlib- code compiles but does not display graph
You should first make sure that you use the right backend. If you run IPython, the backend is normally displayed at start time. You can also get it with print matplotlib.get_backend(). If the backend is not the one you want, you can do matplotlib.use('backend name') first thing, where the backend name is from the matplotlib.rcsetup.all_backends list (not all backends work; for instance, the template backend is supposed to not do anything, but it allows you to check that your code runs). You can set the default backend as explained in the question you linked to. I'm not sure if the following can help too, but have you tried to use matplotlib.pylot.ion(), which switches to interactive mode?

Categories : Python

Excel - Display certain information when interacting with a graph
Yes it is possible using Chart Events. Events are enabled for chart sheets by default, but for an embedded chart you can study this Microsoft article. The same page includes this link for Chart Object Events. This requires programming using Excel VBA.

Categories : Excel

Tooltip doesn't display on highchart graph
Your tooltip definition is fine, but it is in the wrong place. Try putting it at the same level as plotOptions instead of inside. tooltip: { crosshairs: true, formatter: function(){ // THIS FUNCTION DOESNT RUN ?????????? return '<b>'+ this.series.name +'</b><br/>'+ Highcharts.dateFormat('%e %b', this.x) +': '+ Highcharts.dateFormat('%H %M', this.y) ; } // headerFormat: '<b>{series.name}</b><br>', // pointFormat: 'Day {point.x}, Time: {point.y}' }, http://jsfiddle.net/JpMnF/

Categories : Highcharts

Can this be accomplished by a Graph Database?
In Neo4j everything is either a node or a relationship. So it's useful to think: what would be my nodes and relationships? Here it might be, for example, that every "pen drive, "person" and "location" is a node. Verbs like "walk" or "give" would be your relationships. In this model, you'd be able use "Cypher" to query for things like "give me all location nodes connected to pen nodes by the relationship walk." Or, say "start at all person nodes and return nodes who have a give relationship to a pen drive node that doesn't have a give relationship that connects back to the starting person node." This rich graph query language gives you nice algorithms like shortest distance for free, so you beyond a transactional record you could determine whether, for example, a pen drive made it from

Categories : Neo4j

Open Graph: og:image display differences BETWEEN LINKEDIN AND FACEBOOK
This ought to do it. <meta property="og:image" content="image-180x110.jpg" /> <!-- 180x110 Image for Linkedin --> <meta property="og:image:width" content="180" /> <meta property="og:image:height" content="110" /> <meta property="og:image" content="image-200x200.jpg" /> <!-- 200x200 Image for Facebook --> <meta property="og:image:width" content="200" /> <meta property="og:image:height" content="200" />

Categories : Misc

How to store graph data in a database?
I start at the bottom. Is it better to delete the memory after the user log out and read it from database when he logs in or should logging in and logging out should not have any impact on the node? You will need some sort of permanent storage, or your lose all the data you acquired on your first crash/restart that might upset your users a bit. How can I store the data? Well without knowing more about this it is difficult however assuming that you have a list of users and each user can have 0 or more friends then i would go with 2 tables. Users - stores all your user information such as username and password UsersFriends *- store all the relationships in a UserID -> UserID fashion * Example Users Table UserID Username 1 user2511713 2 abstracthchaos 3 a

Categories : Database

Iterating through a social graph in a SQL database
Very cool problem. While it's a social network graph, it is still a hierarchical problem, even though the hierarchy can logistically turn into a web of interconnections. In MSSQL you still want to use a WITH clause to do a recursive query, the only difference is that due to the multiple interconnections you need to ensure unique results, either with DISTINCT or by using an IN clause in the WHERE condition. This works: DECLARE @PersonID bigint; SET @PersonID = 1; WITH RecurseRelations (PersonID, OriginalPersonID) AS ( SELECT PersonID, PersonId OriginalPersonID FROM People UNION ALL SELECT ToPersonID, RR.OriginalPersonID FROM Relationships R INNER JOIN RecurseRelations RR ON R.FromPersonID

Categories : SQL

How can I transform a dataset in a graph database?
For the actual import you would create Cypher statements and run those on the database to create the nodes and relationships. For semantically correct node, relationship and property names, you just have to build the Cypher statements with those desired labels.

Categories : Java

fetching data from json and unable to display proper graph in extjs
fields: ['name', 'date'] shouldn't the second field be "data" instead of "date" I think your problem is the URL of your JsonDataStore. You should get the chart.json as a through a web server without trying read it directly. I hope this post will help you. Can't get jSon dataStore into ExtJS (Sencha Touch) chart: displays error "cannot read property 'length' of undefined"

Categories : Json

Update Graph while picking values from the database
Assuming you have no way of pushing notification of changes to the client, you are likely going to need some kind of polling approach. You could setup a timer (see link below) and query for new data at elapsed intervals. http://msdn.microsoft.com/en-us/library/system.windows.forms.timer.aspx I'm not sure what kind of chart you are using, but you may be able to add new points to the end of the series (and remove old ones from the front of the series) which may give you something like the heart-beat monitor effect that you mentioned... (if the chart doesn't support that you may need to rebuild it, or give it an entirely new series on each update) You probably want to adjust the query you are using so that you get only new data points on each call.. ( where datetime > [maximum datetime al

Categories : C#

How to put date from mysql database into JFreeChart graph?
You can use the getTime() method which returns a long and cast it to double: series.add((double) ch.get(i).get_date().getTime(), ch.get(i).get_pro());

Categories : Java

how to display the node attributes like person's name photo and address in a force directed graph
I'm going to do my best to answer, but there is a lot to cover in your question, so this is more of an overview of where to look for more info, and a bit to get you started down the right path. Please excuse the shoddy links ( I can't post more than two yet...) Nodes can be fixed position by setting the boolean "fixed" property of each individual node to true. See Sections on: # force.nodes([nodes]) https://github.com/mbostock/d3/wiki/Force-Layout To make nodes clickable, you could attach an event listener to the node selection as you are appending new nodes to the node selection. See here: Github /mbostock/d3/wiki/Selections#wiki-on To add more properties to each node, simply add that data to your objects inside the "node" array before joining it to your selection. Here is a edit to

Categories : Javascript

Neo4J/Graph database modeling user devices
I'm a newbie as well, but the best thing to do is to start. This book is a great resource for best practices. I think that you could have different device nodes with properties such as 'os:os1'. And these devices would have a relationship to a carrier node. For example: (A) --owns--> (Device 1 os:os1) --uses--> (Carrier1) Each device would be its own node. Best thing is to play around with it. A good resource for this is to use the cypher console. You can test ideas and share them. Hope this helps

Categories : Neo4j

Neo4j Can we have programming features in quering graph database
Yes. You have two options Server Plugins Unmanaged Extensions Server Plugins The server’s functionality can be extended by adding plugins. Plugins are user-specified code which extend the capabilities of the database, nodes, or relationships. The neo4j server will then advertise the plugin functionality within representations as clients interact via HTTP.

Categories : Neo4j

Cypher Editor does not link to Database Graph in Neoclipse
The graph tab doesn't sync with the query you have executed from the Cypher editor tab. You can however configure the depth of the graph through Options > Neo4j > Maximum Traversal Depth

Categories : Neo4j

How to plot line graph in java/jsp using database values?
You could use Dojo Toolkit for this. Only JavaScript is required. Ajax is possible but not required.

Categories : Jsp

How to draw a horizontal histogram graph base on value in database with php?
I had the same problem and solved with a javascript library such as highcharts. It gets you nice, fancy and easy to use graphs, you just need to define the data the way you already did, but in js. EDITED Highcharts is a library of javascript code that will draw charts for you, just add the library to your page. The documentation is fairly clear to follow. To add it to your page it just put these lines in the <head> section: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> <script src="http://code.highcharts.com/highcharts.js"></script> Then add this row of code, which define where to draw the chart <div id="container" style="width:100%; height:400px;"></div>. You can change the width and height to fit you

Categories : PHP

best way to process local file and update Titan graph database
If the graph schema is not too complex and the data in a single file, the easiest way is to simply use a Gremlin script. Check out this simple recipe to load an edge list: http://gremlindocs.com/#recipes/reading-from-a-file If you have a large amount of data, consider using the BatchGraph wrapper for easier programming, auto-commit and better performance: https://github.com/tinkerpop/blueprints/wiki/Batch-Implementation Once you have your script, you could run it in the Gremlin REPL or execute it from shell script with gremlin.sh: https://github.com/tinkerpop/gremlin/wiki/Using-Gremlin-through-Groovy#gremlin-and-groovy-shell Note that your question is about Titan, but I've responded generically with Blueprints in mind (so you will see TinkerGraph examples in many of these links), bu

Categories : Python

Graph keeps updating based on the new values in the database in visual c++ via thread programming
Add a Timer to your Windows Form (from the Toolbox) and register an EventHandler for the Tick event. Also set the "Intervall" to a value you want. Then either set the property "Enabled" to "true" or start it manually in the "Form_Loaded" EventHandler.

Categories : Database

How To Develop A Database Schema For A Tree Structure(Directed acyclic graph)
Your database structure is not normalised, because you have multiple ids in both node_parent_id and cross_refer. You should separate this information out into separate tables. So, you would have your nodes table, plus a second table to describe the parent-child relationships; this table would have a child node id and a parent node id. The cross-references should be in a third table, which again has two node id columns, but there are two ways you can do this, because the cross-references are bi-directional. One way is to store each cross-reference only once, which means when you query the table, you have to check both possibilities (a cross reference between X and Y could be stored with X in the first column and Y in the second column, or the other way around, so to find X you would h

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.