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
Related
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
In my AnyLogic model there is a source where the parameter agent.type is one of Options from an OptionList called Types.
I want to create a Histogram that shows how many agents there are with each of the different possible Types.
I can do it by setting up a variable for each Type that increments the count() using a longwinded function, but I would prefer to use a dataset or histogram_data optionsHistogram using the OptionsList as the Horizontal axis value, and the count of the number of agents with that type as the Vertical axis value.
Is this possible, and what would you recommend as the best way to achieve this?
Thanks
A histogram is used to plot the spread of one type of data.
If you want to plot the number of agents by type (and that is defined by an OptionList), you should use simple bar chart and use a statistic on your agent population as below:
You can then plot it in a bar chart using this setup:
PS: There is a lot of info about how those agent-pop statistics work in the help, worth a read.
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 !!
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
I've seen a few suggestions here, but nothing seems to apply to my situation. I've also seen some unresolved similar issues. I have scatter plot with a lot of data (about 40k) points. It's really slow. The link below (genetic data - called a Manhattan plot) will eventually load, but it's just slow. I need to find a way to optimize performance.
http://ricediversity.org/test/highcharts/examples/line-ajax/index-b.htm
Also, I'm trying to add additional info (data fields) to my tooltip from my data file, but I can't get that working either. Any suggestions?
You can try to disable animations / shadows.
http://api.highcharts.com/highcharts#chart.animation
http://api.highcharts.com/highcharts#plotOptions.series.animation
http://api.highcharts.com/highcharts#tooltip.animation
http://api.highcharts.com/highcharts#plotOptions.series.shadow
As far as tooltips, check out the highcharts data api, specifically number 2 in the list. If that doesn't cut it for you, you can pass in an array of objects where you specify the data you want to get. Then, in the formatter, it is easy to reference. Here's a JSfiddle showing how to reference the names once they're in your data array.
The formatter is
formatter: function () {
var s = "";
$.each(this.points, function (i, point) {
s += point.point.nameList[0];
});
return s;
}
and the data sets look like:
data = [ ...,
{x: xval, y: yval, nameList: myListOfNames},
...]
where xval and yval are the x and y values of the data points and myListOfNames is an array of strings.
There are some hints on optimising performance on the highcharts website here: http://docs.highcharts.com/#faq$optimize-performance
However, with that many points, I would consider using highstock. There is no way to make out the detail of that many points, so aggregating them in some way would make a better chart (http://docs.highcharts.com/#data-grouping).
Perhaps too late to be useful (and the example link no longer works, so I'm not sure if this applies), but there's a newish Highcharts plugin to downsample time series data with the intent to retain the shape of the original data.
http://www.highcharts.com/plugin-registry/single/13/Highcharts-Downsample