I am using Highcharts to make a lot of several different types of graphs. I want to break the the line when there is a data gap. I am using sensor generated data so adding null is not an option. Because the site uses several different graph types I want to stick with Highcharts for all the graphs, but am looking for the gapsize feature that is available in Highstock.
It there a way to get the gapsize or similar feature to work with Highchart NOT Highstock?
Thanks
As you seem to already know, inserting null will accomplish this. Why is it not an option? Even if you don't control the server returning the data, you can still manipulate it before passing it to Highcharts.
Another option is you could create another series in the chart, but this is more complex than inserting null. Either option requires the data to be manually manipulated.
If you still think inserting null is not an option, post some code and also detail how you will know where the break should happen.
Related
Using Vaadin's charts (which ultimately uses HighCharts), I'm trying to plot a line graph with over 10,000 points. It actually works reasonably quickly (a couple seconds to plot). However, I wonder if it can be much faster, as I came accross a similar problem when using JavaFx charts and discovered that people have implemented a solution using the "Ramer–Douglas–Peucker algorithm" to reduce the number of datapoints in such a manner that it's basically noticeable to the human eye when its graphed. (Here's the original answer from SO: Performance issue with JavaFX LineChart with 65000 data points).
So, does highcharts already have such built in functionality? If not, does Vaadin? Or, do I need to recreate this logic in Vaadin, which means I ultimately need to find a Java library for the Ramer–Douglas–Peucker algorithm....
Unfortunately, Highcharts doesn't have "Ramer–Douglas–Peucker algorithm" built-in. However, it has a boost module which allows rendering thousands of points in milliseconds.
The Boost module allows certain series types to be rendered by WebGL
instead of the default SVG. This allows hundreds of thousands of data
points to be rendered in milliseconds. In addition to the WebGL
rendering, it saves time by skipping the processing and inspection of
the data wherever possible.
API reference:
https://api.highcharts.com/highcharts/boost
Demo:
https://www.highcharts.com/demo/line-boost
What's more, using Highstock you can use dataGrouping.
Data grouping is the concept of sampling the data values into larger
blocks in order to ease readability and increase performance of the
JavaScript charts.
API reference:
https://api.highcharts.com/highstock/series.line.dataGrouping
Demo:
https://www.highcharts.com/stock/demo/data-grouping
With most of the chart types when you ise Vaadin charts it actually makes more sense to apply algorithm to reduce number of data points in your server side logic, e.g when copying data from original data dourse to DataSeries you use in the chart. This does not only reduce rendering time, but time to load the data to browser as well.
I would also recommend to calculate linear regression as additional two point DataSeries on server side if such thing is needed.
I am using highcharts to render my graphics in my web-based user interface. I am a novice programmer. I am receiving help from a number of folks. But, they and I cannot seem to remove the underscores from the x axis data values. I have searched the highcharts forum and see no mention of it there (I may have missed it). I am certain it is one of the options, but I cannot find it.
I am working on a project in which i have a database created using mysql and php. I want to advance it by connecting an image to it. every object in my database is going to be linked to a certain part of the image that will be highlighted.
I am not really sure how to do this.
As of right now, i have a search feature on my database that gives me the result.
I am willing to try any programming language that would make this easier.
My database has about maybe 1000 entries. They are all numbers that correspond to a certain location on my image.
My image is basically a map.
I'm not entirely sure what you are trying to do, but if you want to plot a graph you can use the HTML 5 canvas as some JavaScript. Or better yet, use tool that already exists like Google Charts. Maybe a scatter plot is what you're looking for?
I am looking for a quite specific tool for generating charts, within Ruby on Rails application. I have done a research and couldn't find a solution that suits me.
Maybe you've bumped upon it and could just point me to it with a link? :)
My requirements for a solution are:
it has to feature basic chart types
like Pie, Bar, Stacked Bar, Line.
it has to have basic configuration of
a chart like legend, axis
description.
it has to be able to generate and save chart into image file without
actually rendering it in a browser
being a Ruby library would be nice,
but it is not obligatory
not being Gruff Graphing Library, I
am looking for something more up to
date, with less issues.
If you are aware about something, please post a link - it'll take you just a few seconds.
I think, that it is what you're looking for.
http://highcharts.com/
https://github.com/loudpixel/highcharts-rails
I've made a number of useful charts with the Google Chart API. There are a few gems: googlecharts, gchartrb. I haven't used them but they look like a good first cut.
As to not displaying it you can just make the call and save the result. No need to render, just make the call, get the URL, and fetch the file.
The only one that has satisfied all these conditions:
I have been able to make it works without need of install weird dependencies
Not has an HTML context requirement (all JS libraries)
Not depends on GCharts (net traffic dependency)
Exports to static graphic format
is gerbilcharts
Chartkick!!!
It's super nice. =)
It's been a long time since I asked this question and I see new people coming and posting new answers, which his great. This small post of mine turned out to be a small compendium of available libraries.
I decided to add my two cents. Nowadays whenever I am dealing with charts I usually use Highcharts. Highcharts is a very pleasant library by itself, but additionally there is incredible gem highcharts_on_rails which facilitates creating charts using DSL written in Ruby.
If you found this question and you're looking for options, consider highcharts_on_rails.
This might be able to do what you want:
Gruff
You can use rchart for plotting various chart.
I am using openflashchart
http://pullmonkey.com/projects/open_flash_chart2/
you can save generated json data in database and render when needed
I am looking for a rails flash graph/chart plugin, for drawing
bar chart,
stacked bar chart,
pie chart,
stacked area chart,
and line graphs
which support the below criteria,
1. Customizable tool tip. For eg: when i am drawing a stacked area graph, i want to display all the y axix values for that x axis point as tool tip.
2. Graph should support on click event
3. The graph should be able to send as an image through inline attachment.
4. Column graph, that should be able to display the value above the bar.
5. Should be able to turn off the animation
6. We can draw two y axis
Any help is highly appreciated.
Thanks in advance.
Nithy"
EDIT: I am willing to purchase a commercial license if its servers the purpose.
I don't know which ones will have all the features that you want but I was playing with charts a while ago and this is a list of some possibilities:
Ziya(http://ziya.liquidrail.com/) - Rails plugin
AmCharts (http://www.amcharts.com/) - The one I ended up using because of flexibility - No rails plugin but it is quite simple to deploy using with rails XML support (I guess it does export images and has all the features you want though it might take a little while to understand and make full use of it)
Fusion Charts (http://www.fusioncharts.com/) - Seems to be a good option if you are willing to inve$t some money on it
Gruff (http://nubyonrails.com/pages/gruff) - Also rails plugin - I don't remember anymore why I decided against it but I think it was because of the lack of animation
OpenFlash (http://openflashchart.com/) - I liked this one though I just used as a proof of concept
I also did try the Timeplot (http://www.simile-widgets.org/timeplot/) that is totally javascript because I had a problem with the amount of points it was required for my charts and the flash-based solutions had several limitations on that. Though I gave it up because of deployment time contraints.
Hope it helps.
Check out Highcharts http://www.highcharts.com/
Cheers,
I also heavily use AmCharts in conjonction with the Ambling Rails plugin.
If you go this way, know that you will pass time in the AmCharts reference documentation for fine-tuning the parameters of your charts. But it's worthwhile considering the results it give.