Below is url that chart I am using.
http://chart.apis.google.com/chart?cht=lc&chco=99C754&chs=400x150&chds=20,1&chd=t:1.0,1.0,1.0,1.0,1.0&chxt=x,y&chxl=0:|12/07/09|12/14/09|12/21/09|12/28/09|01/04/10&1:1|10|20&chxr=1,20,0,10&chls=2&chg=25,100,1,2&chm=o,54C7C5,0,-1,5&chxtc=1,15|0,15
I want to start y-axis from 1 but in my chart is started from 0.
please help me
little look at google
show :
Axis Range chxr :
You can specify the
range of values that appear on each
axis independently, using the chxr
parameter. Note that this does not
change the scale of the chart
elements, only the scale of the axis
labels. If you want to make the axis
numbers describe the actual data
values, set and
to the lower and upper values of your
data format range, respectively. See
Axis Scaling for more information.
You must make an axis visible using
the chxt parameter if you want to
specify its range.
To specify custom axis values, use the
chxl parameter.
http://code.google.com/intl/iw/apis/chart/docs/gallery/bar_charts.html#axis_range
Related
I am creating a chart using chart js, putting few threshold lines also in that. But the content/title for those line is overlapping with x-axis if its value is 0 or in negative.
enter image description here
Try to define the option scales.y.suggestedMin. This is a common option to all axes.
suggestedMin: Adjustment used when calculating the minimum data value.
For further information, please consult Axis Range Settings from Chart.js documentation.
I have the following graph, and I want to rotate the X-axis labels in 40°, how can I do that?
PowerBI does not let you override the label orientation but rather adjusts it based on the space you allocate to the visual. Try making your visual a bit wider. For long labels, increase the maximum size of the X Axis on the settings to give more space to the labels and less to the bars. You can also tweak the padding and width settings to eek out a little more space. Also, consider abbreviating long labels.
Under the x-axis switch on the concatenated label. THis should do the trick for you
I went through the same issue/requirement but found no available configuration option for X axis labels. Labels are adjusted automatically based on number of BAR and width of the chart. Anyway, you can look on different options under "X-Axis" after changing the Type to "Categorical" as shown below-
Is it possible to create a figure with a grouped axis AND a RangeTool?
This example demonstrates the RangeTool https://docs.bokeh.org/en/latest/docs/gallery/range_tool.html.
I have a list of tuples factors which I want to use as a grouped axis:
[('2017','Jan'),('2017','Feb')..('2019','Oct')]
In the example, the initial pan on the plot seems to be set by x_range in
p = figure(plot_height=300, plot_width=800, tools="xpan", toolbar_location=None,
x_axis_type="datetime", x_axis_location="above",
background_fill_color="#efefef", x_range=(dates[1500], dates[2500]))
However, to use a grouped x axis, one must use FactorRange ala x_range=FactorRange(*factors). I've tried various forms of indexing of factors with FactorRange and cannot get it to work. Is such a thing possible in Bokeh?
The plot in here demonstrates an example of a grouped axis:
https://docs.bokeh.org/en/latest/docs/gallery/bar_mixed.html
The RangeTool assumes an underlying numeric axis, so there is not a direct way to accomplish this. The only route I could see would be to simulate a categorical axis by using a numerical axis with a fixed ticker and tick labels that correspond to the "categories" you want, and then to plot the bars using the corresponding numerical coordinates.
In v2.0-beta, is there a way to configure the tooltip corresponding to that x-position to show up when hovering anywhere above that point on the axis? for example, the functionality shown here:
https://blockchain.info/charts/market-price
As you trace the line horizontally, you are shown the tooltip corresponding with your distance from the y-axis.
What the tooltip shows in your example is the y value corresponding to the distance from the y-axis (i.e. the x value).
Unless you want to extrapolate between data points (not usually a good idea for data like that shown in your example, since you don't know that its going to follow your extrapolation), this means that you need to have data values for all points where you want to show the tooltip.
With that your question is basically about showing every n x axis labels. https://stackoverflow.com/a/31606933/360067 does this similar for the current stable version of Chart.js. For v2.0-alpha, the option you need to be adjusting is scales.xAxes.labels.template.
I can't figure out why Google Charts draws this simple chart aligned to center and doesn't fill entire white area.
Note: X axis is discrete because it represents weeks.
Do you have any idea what can I do with it?
That is how the charts display when you use a discrete (string) axis. If you want edge-to-edge lines, you need to use a continuous (number, date, datetime, timeofday) axis. See an example of the differences here: http://jsfiddle.net/asgallant/Xfx3h/.