I am working on a graph that i want to show between two dates. Sometimes there may not be any data at the start or end of the date range.
I tried to use the setExtremes options but when i do it blanks the graph, see example below
http://jsfiddle.net/xpvt214o/353609/
chart.xAxis[0].setExtremes(DateFromMin, DateToMax, true,false);
If you comment out the setExtremes function above the graph generate but when its in the code it doesn't
Same thing happens if i use the min and max on the x axis. Any ideas?
The issue was the the min and max figures were stings instead ints - thanks to ewolden in the comments for the answer
Related
I am trying to illustrate the twist in a sail using a chart, showing the effect of various twist amounts.
However, try as I might, I cannot swap the x and y axis! The cells B3:B8 are the height going up the sail, where the measurements were taken, and should be the y-axis.
The columns C:V are series, which are different sets of measurements taken at the various heights up the sail, with the degree of twist as the series' values. This is what I have:
I've also tried to create the chart from Transpose()d data (swapped rows <-> cols) but ended up with the same chart! The "Height" is supposed to be the Y-axis, and the values ("Degrees") the X-axis.
I must be missing something obvious, but Google is not my friend today. I have created a sample Spreadsheet here if anyone can help. MTIA.
Currently it is not possible to define the Y-Axis to a specific range for Smooth Line Chart, in fact, the only way this can be defined is by using Bar Chart.
As a workaround, you can use Bar Chart to define the Y-Axis like this:
Please note that it only looks best when displaying one or two series, the bars would look squished when more series are added.
As for the original intention of defining Y-axis for Line Charts, or a completely new type of chart, you can file a feature idea request here:
How To Submit a Feature Idea Request
Google Workspace Feature Idea Request Link
I have a chart of profits&losses I made trading stocks in absolute ($) and relative (%) values. Today I made my first trade that brought me losses, and adding negative values to the chart caused its y-axes to misalign.
I tried manipulating the min/max values, but to no avail. I googled people having similar problems, but not in Google Sheets.
Does anyone know a solution to this problem?
Solution
The Auto gridline count can behave wrongly with particular datasets. When handling such datasets it will be necessary to tweak the major gridline count from the Chart Editor:
Edit Chart>Customize>Gridlines and adjust the major gridline count accordingly.
What I need is to show a different valuesuffix for each chart type value based on a unique array for each series.
I have considered the answer in this question and created this jsfiddle.a
It will only work when the tooltip is displayed for one series at a time. If I set the series tooltip to be shareda, it will not work.
Any ideas?
For tooltip shared with multiple series, you need to loop the points like this in order for the tooltip to work.
Edited: Added valuePrefix
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 created Highstock chart with 3 series,
some of the series have missing data in some time interval.
what the Highstock does is "complete" or "connect" the points to each other but I want it to plot no data in those intervals.
how can I do that?
I tried to set the xAxis intervals but it did not work.
here is some basic example from thewebsite.
Example from highchars.com
in this example it does what I want - you can see that there is points which are not connected.
Look at the 'connectNulls' property:
http://api.highcharts.com/highstock#plotOptions.series.connectNulls