FusionCharts column_2D chart - fusioncharts

How to set the y-axis interval, or 'tick mark?' with a min value of 0 and max value of 9, I'm seeing tick marks every '2', like 0,2,4,6,8,10. I don't want that.. I want y-axis lines every .25
Funny, in fusion charts I can set the background color of the yaxis labels, put a dashed border around the background, even control the space size between the dashes.. but I can't set something important like the tick mark interval

FusionCharts supports 'numDivLines' that allows you to specify the number of divisions on the y-axis. The number of lines required for the chart can be calculated using min and max values. Set 'adjustDiv' to 0. This will force fusioncharts to use the user-defined 'numDivLines'.
JS-Fiddle: https://jsfiddle.net/spranali/yvmq0ab1/44/
adjustDiv: 0,
numDivLines: 35,
yAxisMinValue: 0,
yAxisMaxValue: 9,
The height of the chart has to be scaled to occupy the specified y-axis intervals.

Related

Make Highcharts pick a smart y-axis min

For a bar or column chart in Highcharts, is there a setting(s) to make it automatically set the min of the y-axis based on the min of the data? For example, if my data values fall between 200 and 300, then the plot doesn't look so good if the chart y-axis starts at 0, but rather it looks much better if the y-axis min is 200.
My current approach is supply the yAxis.min setting the minimum vale from the data subtracted by some "smart offset" (smart offset so that the min of the data is not plotted at the very bottom). The problem is i'm not 100% yet how to calculate that "smart offset" so I'm wondering if Higcharts can do the min from the data for me (rather than supplying it), then it might be able also figure out that offset.
You need to enable softThreshold property:
softThreshold: boolean
When this is true, the series will not cause the Y axis to cross the
zero plane (or threshold option) unless the data actually crosses the
plane. (...)
series: [{
softThreshold: true,
...
}]
Live demo: http://jsfiddle.net/BlackLabel/05tgmz9c/
API Reference: https://api.highcharts.com/highstock/series.column.softThreshold

Highstock charts - Show the blank space up to the current date

Currently, I'm having trouble to force the highstock chart to display a blank space up to the current date. It focuses the data I give it.
What I have is:
What I want is something like this
As you can see I want the data to stop at the date of the latest data point and then the graph should show a blank space and stop at the current date. Obv there is not data points for those times
You can control how empty points, and missing points are shown by looking at:
xAxis.ordinal
In an ordinal axis, the points are equally spaced in the chart regardless of the actual time or x distance between them. This means that missing data periods (e.g. nights or weekends for a stock chart) will not take up space in the chart. Having ordinal: false will show any gaps created by the gapSize setting proportionate to their duration.
xAxis.max
The maximum value of the axis. If null, the max value is automatically calculated.
plotOptions.series.connectNulls
Whether to connect a graph line across null points, or render a gap between the two points on either side of the null.
Which means that for your graph, you will want to set:
xAxis: {
ordinal: false,
max: (new Date()).getTime() //to set the current date and time as a maximum
}

MpAndroidChart - How to set the same space between the x-axis label?

According we can see in this image, the size of the last x-axis area is less that the others. With this, the Sunday looks less that the other days of week..
How can I put he same distance between the x-axis grid?
I'm drawing 4 points for each day of week. So, my X-values are
{Mo,Mo,Mo,Mo, Tu,Tu,Tu,Tu ... Sun,Sun,Sun,Sun}
and
xAxis.setLabelsToSkip(4);
You may enable the horizontal scroll bar by
lineChart.setHorizontalScrollBarEnabled(true);

Google column chart customization

For example, i have chart that displays my weight changes by monthes.
Monthes goes on hAxis and weight values on vAxis
I have a few question:
1) How to set hAxis from 0 to, say, 70?
My initial weight was 70. I want to set hAxis baseline to this value. Thats allows me to show my weight changes. For example, in november it was 75 kgs (+5kgs) and this bar should go over the hAxis baseline. In december my weight equal 65 kgs (-5 kgs) and this bar should go under the hAxis baseline. Is it possible?
2) How to change bars fill color?
set vAxis baseline property to needed value:
vAxis:{baseline:70}

Problem with Google Chart

I'm developing an application which draws some charts and I'm using Google Chart. After I have all the needed data I build the URL dinamically. The problem is that Google Chart doesn't always fix the maximum and minimum of the chart to the values I provide. I calculate Max and Min Values based on the data of the cart. I've set them to be always an integer to avoid any problem.
I'm going to set an example with numbers:
(I write it in different lines with "comments (//)" so it can be read easily, though it is in the same line with any comment at all)
http://chart.apis.google.com/chart?
cht=bvs& //chart type
chs=250x250& //chart size
chd=t:10,0|4.48,0|15,-58.42|0,4.73|0,73.44& //chart data
chco=4D89D9,C6D9FD,FF0000,00FF00,0000FF& //chart colors
chds=-59,80& //data scaling
chf=bg,s,edf5ff|c,s,f6e426& //chart fill color
chtt=my_title& //chart title
chdl=A|B|C|D|E& //chart legend
chdlp=r& //legend position
chxt=x,y& //chart axis
chxl=0:|Col_1|Col_2& //Axis labels
chxr=1,-59,80& //Axis range
chbh=r,1,0& //Bar thickness and spacing
chg=0,12.5 //Grid Lines
with this configuration I'd get this chart. As you can see the zero line is over zero because data has not been scaled isn a good way.
but If I change the maximum and minumum of the chart to -60,80 I get it in a good way
It would be this code:
http://chart.apis.google.com/chart?
cht=bvs& //chart type
chs=250x250& //chart size
chd=t:10,0|4.48,0|15,-58.42|0,4.73|0,73.44& //chart data
chco=4D89D9,C6D9FD,FF0000,00FF00,0000FF& //chart colors
chds=-60,80& //data scaling (CHANGE IN THIS LINE)
chf=bg,s,edf5ff|c,s,f6e426& //chart fill color
chtt=my_title& //chart title
chdl=A|B|C|D|E& //chart legend
chdlp=r& //legend position
chxt=x,y& //chart axis
chxl=0:|Col_1|Col_2& //Axis labels
chxr=1,-60,80& //Axis range (CHANGE IN THIS LINE)
chbh=r,1,0& //Bar thickness and spacing
chg=0,12.5 //Grid Lines
And this chart which seems to be OK:
Can anyone tell me why Google Chart behaves in this way?
Thanks
I changed itsetI get the max and min values to a number which corresponds to the common divisions in a logarithmic scale. I mean:
if value is inside (0,10) I choose an integer value
if value is inside (10,100) I choose 10,20,30...1000
if value is inside (100,1000) I choose 100,200,300...10000
and so on.
With these values Google Chart seems to work.