Grouping of data in amcharts - javascript

I am using maxseries to disable grouping of data for that I have set its value to 0 so that it will not group data in any groups. But for one month view my axis scale is not consistent see image. Is this is because of grouping of data or there in any other issue.
My main motive to make the gap b/w two lines consistent , if there is no value in db for particular date then scale must shifted to next date so that gap remains same

Related

Having trouble displaying a date X axis, How do I get all dates, not just where data points are plotted?

I have a chart to display values across time, but there aren't data points for each day. The chart is just displaying dates on the X axis where data points exist. I want each date to have a vertical line, and the day displayed below for every day in the range (unless overlapping).
I'm using chart.ja version 4.2.1
Extra Points :-)
I would also know how to keep the dates from overlapping when a large range (lots of dates) is being plotted.
Lastly, is it possible to display the dates on three lines, where the top line is the day, the second line shows the month name (once) in the middle of the month, and the third line shows the year in the middle of the year.

Chart.js creating a line graph with date dots

I'm trying to build line charts with only dots, that represents list of max dates group by other column.
i already build several charts but non of them implements date data.
example of expected result:
x - the field that data will group by
y - the max time of each field

data point and ticks are not aligned in highstock line graph

The data point plotted is not matching exactly with the tick or the ticks are not placed at the data points. when I reduce the range with the navigator I having this problem seen very clearly. Is there any way so that i can set that ticks will be coming for Saturdays or any day which i specify?
You can set tickInterval http://api.highcharts.com/highcharts#xAxis.tickInterval and define pointStart http://api.highcharts.com/highcharts#plotOptions.series.pointStart. You can also use other solution by using http://api.highcharts.com/highcharts#xAxis.tickPositioner

Declare dygraph granularity

I am trying to show a graph with dygraph with a TWO_DAYS granularity but I'm not able to find the way of declaring it.
Any ideas??
Thank you very much!
You are looking for the dateWindow parameter I think.
dateWindow
Initially zoom in on a section of the graph. Is of the form [earliest,
latest], where earliest/latest are milliseconds since epoch. If the
data for the x-axis is numeric, the values in dateWindow must also be
numbers.
Type: Array of two Dates or numbers
Default: Full range of the input is shown

Highchart js max 15 plots to be plotted

I have been trying a lot in Highchart js and still cant find a way to reduce the number of elements in the series.
If i get more than 15 days data i have to reduce it back and show to user as 15 days data so that user can see the data without crowding of data. Max 90 days will be given in the series which i have to reduce to 15 days.
check my current code here in http://jsfiddle.net/MULZL/
can any one give me a solution for it ?
P.S: I dont want to reduce it to first 15 days or last 15 days. I want to do it just because getting 90days in the chart looks crowded and i dont want zoom functions to apply. I want the solution for ignoring some data (days) to make it 15days if it is more than 15 days
You can programmatically zoom into the required time range using the Axis.setExtremes method. In your case you may want to do it on load
Here is how you would do it, if you want to zoom into the 1st 15 days of the given data, you can easily modify to zoom into last 15 days.
function zoomTo15Points(chart){
var points=chart.series[0].points;
if(points.length<15) return;
var min=points[0].x;
var max=points[14].x;
// If you wish to zoom to 15 days and not 15 points, you can modify max as
// var max=min + 1000*60*60*24*14
chart.xAxis[0].setExtremes(min,max);
chart.showResetZoom();
}
If you do not want to let the user zoom out, you can disable the last line, but you also will have to disable zooming, else the button would appear if user zooms inside the 15 days.
Highchart Zoom on Load # jsFiddle
You can try dataGrouping feature of highStock
var dataGrouping = {
groupPixelWidth: 40,
units: [[
'day',
[1, 2, 3,4,5,6]
]]
};
Highcharts would make sure all your columns are at least the specified width (40), if the number of coulmns is large, such that it's not possible to have that width, it will group data using the units, so it will group data of 1 day into 1 column or 2 days into 1 column and so on.
Not sure if you really want exactly 15 plots, but I think you concern was to avoid crowding of data, this does exactly that, but the number of columns will vary based on the width you specify, the width of the plotArea and allowed units and its multiples. Tweak the values as per your data and width of your chart.
jsFiddle

Categories

Resources