I have data like:
Date
Foo
Bar
27/06/2022
12345.67
2345.67
04/07/2022
12354.76
2354.76
11/07/2022
12543.67
23456.78
18/07/2022
15432.76
26543.78
I had a chart with time axis (the one with the adjustable scale at the bottom) that used first column as X axis and second column as data, using first row as series titles.
However, now I'm in need to draw next series, but it has to start from 11/07/2022, no prior data drawn. Setting up the range as C4:C1000, starts drawing from the beginning (as on the image below). It occurred to me I need some sort of a filler for the data in the series to adjust, but I have no idea how to do it and I couldn't find any clue googling.
Hence question: how to shift start of series in a chart with time axis?
You're wearing a heart rate monitor for most of the day, you take it off to shower, and then put it on. During that period it records no data or 0 so the a line, in a line cart depicting your hart rate, drops to the x-axis.
Is it possible to segment the line over the period you took it off rather than have it drop to the x-axis?
By passing '0' values to iOS chart's line chart then it will drop x-values.
I suggest to make filter before passing values as '0', just remove though values. But you though values greater then '0' and going to display on line chart you can put date and time or only time.
So in line chart your requirement will get satisfy.
To assure time continuity, I convert NSDates of a time series into time interval, and use for scatterplot or bar chart. The problem now is that Saturdays and Sundays are also included in X axis scale.
I wonder if it is possible to excludes weekends from the axis scale, making Monday date a following day of Friday, while still sticking to the use of time interval.
I could use custom labeling, but my time series does not include all weekdays, and I still want all weekdays to be shown even if not include in the time series.
Thanks
Core Plot plot ranges always cover a continuous range of values. To cut out the weekends, you'll need to define a mapping between dates and the linear time scale of the plot that excludes the weekend dates. The mapping should be defined both ways (date to plot value and plot value to date) so you can label the axis.
I have a simple column chart where the yAxis series data contains numeric strings in the millions and tens of millions. The chart therefore displays the graph numbers like this: "12.5M"(on the side of the grid) and in the points tooltip it is being displayed with a decimal point at the end. How do I make the data be shown in the thousands with commas? Will the chart be adjusted automatically to display more grid lines and raise the columns higher? Thanks a lot in advance.
I would have added an image, however it seems that that requires more reputation points. Sorry. Here's a link to it Screenshot
1) you can change the formatting of the axis labels by setting your own format with the formatter function
http://api.highcharts.com/highcharts#yAxis.labels.formatter
2) you can change the number of ticks by setting a tickInterval or tickPixel interval setting
http://api.highcharts.com/highcharts#yAxis.tickInterval
http://api.highcharts.com/highcharts#yAxis.tickPixelInterval
3) You can change how much extra space is added at the top/how many ticks there are, in part, by setting the maxPadding setting to 0
http://api.highcharts.com/highcharts#yAxis.maxPadding
When you have a small chart like the one you posted, Highcharts will often have trouble adapting its normal tick pattern, and you will often end up with just a min and max tick by default.
It's pretty easy to work these setting to get what you need though.
I have a problem with HighCharts xAxis label. Date on xAxis label difference on tooltip and there are have 2 gridLine on a tick point. I thing have problem with json data but I don't know why.
Here is my code http://jsfiddle.net/jevgzgjx/1/
My data as a json array with timestamp:
var json = [[[1362783600000,5691],[1362870000000,6503],[1362956400000,15574],[1363042800000,16211],[1363129200000,16427],[1363215600000,16486],[1363302000000,14737],[1363388400000,5838],[1363474800000,5542],[1363561200000,15560],[1363647600000,18940]],[[1362783600000,4346],[1362870000000,4112],[1362956400000,11356],[1363042800000,11876],[1363129200000,11966],[1363215600000,12086],[1363302000000,10916],[1363388400000,4507],[1363474800000,4202],[1363561200000,11523],[1363647600000,14431]]];
The problem here is that your timestamps are all for 23:00 (11pm). Therefore the point is being drawn slightly to the left of each grid line (since the gridline is for 00:00 each day). It also causes the tooltip of each point to show the day before, since the point is in fact not on the day that the gridline displays, but one hour prior to that.
You can visualize this problem by modifying dateTimeLabelFormats, so that the hours are shown in the tooltip, like this (see this JSFiddle):
dateTimeLabelFormats: {
day:"%A, %b %e, %Y, %H:%M"
}
I'm not sure about the origin of your problem, but it can be solved by adding 3600000 (one hour in ms) to all your timestamps. The problem may be timezone related as timestamps in Highcharts are treated as UTC by default, so look into getting your timestamps in UTC as well.
If you use Date objects you can specify the timezone before getting the timestamp. You can disable using UTC by default with global.useUTC: false (API), but then you'll risk ending up with different results depending on where you are viewing the chart.