Highchart with many Y scales with the same value - highcharts

We are using highcharts to build line chart, but we notice the following strange behavior :
When a data contains "Y" with constante value, the chart is displing Y axis with many scales with the same value (the same value passed in data)
Is this behavior is a bug in highcharts ? how can we do to avoid it ?
Thanks in advance.
~Mounir

I assume that you mean yAxis, so you can use min/max values or use tickPositoner / tickPositions. All of options are documented here: http://api.highcharts.com/highcharts#xAxis.reversed

I think i can reproduce the bug in highcharts verion 2.2.1 (that we are using) and the version 2.2.4 (see my comment above for jsfiddle code)
But in the last stable version of highchart, it seems that it's working fine

Related

Is there a way to plot more than 1000 points in a scatter plot using the Highcharts .NET Wrapper?

I've seen some posts that mention a 1000 point limit, which is what I am encountering. I'm using Highsoft.Web.Mvc.Charts
Perhaps there is a different way than to use, Highcharts with Chart.Type = ChartType.Scatter and Series with a ScatterSeries?
According to the comments - disabling the series.turboThreshold allows rendering a higher amount of points.
API: https://dotnet.highcharts.com/Help/Highcharts/html/class_highsoft_1_1_web_1_1_mvc_1_1_charts_1_1_plot_options_scatter.html#a3674387e934212eb1327e07c29678d9f

highcharts/highstock tooltips issue : point.config[2] missing, fine on subset of same data

I'm evaluating Highcharts. It is a brilliant charting solution but I've hit a problem I just cannot work out.
I have a dataset where each point has x, y, and additional data in an array for example:
[[1432022880000,6,['192.168.100.144','36215','192.168.100.191','5432','tcp']],
[[1432022880002,4,['192.168.100.144','36216','192.168.100.191','5432','tcp']],
...
I use a custom tooltip formatter to show the conversation details, which relies the metadata in the array at point.config[2]
With a fairly modest dataset size of about 300 points the tooltips won't function and I get the following in the console:
TypeError: 'undefined' is not an object (evaluating 'this.point.config[2][0]')
However, it works fine with a subset of the exact same data. Unless I've missed something there's nothing wrong the larger dataset but I'm completely stuck for what is happening. In the code of the app I use setData to update the larger series and although there are no errors thrown onto the console the point config objects lack the array at [2], and it works fine for the smaller dataset.
Here's a fiddle for the smaller(subset) of data, where the tooltip works:
http://jsfiddle.net/stevehicks/m37sdef5/14/
...and here's one for the "full" dataset where the problem exists:
http://jsfiddle.net/stevehicks/vhx66vgb/11/
Any help would be greatly appreciated as I've burnt over a day on this :(
Similar kind of issue has been reported in the High Charts Repos page
Bad Performance with large Series (tooltip specifically)
Follow up the issue and track the workaround provided on the page.
Kacper from the Highcharts support team has pointed out that it's the effect of datagrouping :
The problem is that large data set is grouped to fit in window and that grouped points do not have custom properties.
Grouping can be disabled.
plotOptions: {
series: {
turboThreshold: 0,
dataGrouping: {
enabled: false
}
}
},
Example with current version of Highstock : http://jsfiddle.net/vhx66vgb/12/
For older version this fix doesn't apply - no plot is being rendered: http://jsfiddle.net/vhx66vgb/13/
Many thanks to Kacper !!

AMChart implementation for "DateTime" AxisType?

I am porting a set of Highchart implementations to Amcharts. In highcharts, there are a set of AxisTypes namely Linear,Logarithmic,Datetime, which determine the number scale of y axes.Found alternatives in Amcharts for Logarithmic and Linear [ValueAxis { logarithmic : true/false }], but unable to find alternative in amcharts for "datetime" axis type.
The following is the effect of setting these axis types for a given set of data:
Linear:
Logarithmic:
Datetime
Any help is greatly appreciated..Thanks in advance
As I understand, you need to show duration on your ValueAxis, here is an example:
http://www.amcharts.com/demos/duration-on-value-axis/
You can control how the datetimes are displayed on the ValueAxis by implementing your own LabelFunction on the ValueAxis.
See: http://docs.amcharts.com/3/javascriptcharts/ValueAxis

HighCharts : How to REMOVE (or) HIDE a certain data POINT in Series?

In HighCharts, let's say I have a data series. As usual like this:
Then how do I NOT DISPLAY (or HIDE) a point? Like this:
(This is Photoshopped)
Reason
Because of in some charts, there are some factors that there are points with NOT APPLICABLE value. (Data unknown or something like that) BUT NOT ZEROS. (ZEROs still means a value) So that i can not even put as the Zero while the value is N/A (or) unknown. Otherwise, it will confused the user, and then it is dangerous.
Even more worse thing is, this is health related charts. I can't let the reader misunderstood.
You can set null to the point value.
Demo: http://jsfiddle.net/IrvinDominin/X3zEq/

D3 Geo albers USA map showing Puerto Rico and Virginia incorrectly

Having trouble showing a clean us states geo map in D3.
I copied exact code from http://examples.oreilly.com/0636920026938/chapter_12/04_fill.html
Also downloaded us-states.json from http://examples.oreilly.com/0636920026938/chapter_12/us-states.json
In firefox on CentOS, I just saw a big steel blue box covering the whole svg element instead of the individual states.
Eventually figured out that with d3.v3.js Puerto Rico is not supported, so deleted the last line in the us-states.josn file containing the description for Puerto Rico.
Still get a big steel box; Traversing the html showed that path element corresponding to Virginia also shows a big square steel blue box across full SVG element.
Added style("opacity",function(d) { if (d.properties.name=="Virginia") return 0.0; else return "1.0"; })
Now the map displays all the states minus Virginia which shows white space and Puerto Rico which I manually removed from the data file.
Looked at geometry of Virginia in the html element and json file and see nothing very different or unique about Virgina, it is drawn in 3 parts but other states like Washington are drawn in four.
Any suggestions why Virginia is not being correctly shown. The inspection of HTML tag for Virginia looks OK as well and seems to reflect the data. How does one add debug code to figure out at next level of detail why D3 internally or the browser externally is struggling to draw Virginia and default to darwing a big steel blue box across the whole svg area?
The code started out exactly as in the book examples, only change is the d3.v3.js is downloaded afresh from the zip file in the d3 org site..and of course the opacity of Virginia was programmatically reduced to zero
Thanks .. Thought I had a browser problem, then a data problem, finally a d3 library version problem but eliminated all and now need help to decide what next to look at..
There have been some changes to the geo functions in D3 between version 2 and version 3 which you can find in the release notes and I suspect that this might be the reason you're having issues. Have a look at the release notes for 3.1.8 which mention Puerto Rico has been removed and clipping is applied. I think that these would explain what's happened to you map. FWIW I've just tested that code with d3.v2 and everything rendered as expected. In your map you can partially get the issues you're around this by setting your fill to none and your stoke to something which results in the outline that you expect, not that that answers your question. I'd suggest posting this on the d3 google group 'cause Scott Murray often posts there and I'm sure that he already has the answer.
Just checked w.Scott Murray, and he confirmed that indeed the coordinates for the state of Virginia used to work, but then D3 changed how it handles geodata in version 3.1.8. As of today, a new version of us-states.json is now available here: http://examples.oreilly.com/0636920026938/chapter_12/us-states.json
and works well with the latest D3 3.4.6 version.
In the JSON code for Virginia it looks like there is an outline of a box inserted into the code ... it is one of the three parts of Virgnia's multi-polygon. If you remove this box (it'll have only four coordinates) the JSON should work. You will lose the outline around Alaska/Hawaii on the full U.S. map.

Resources