XY chart labels are exceeding the chart boundry - amcharts

When I have some values in the XY chart, some column label locations' are exceeding the boundary of the chart, like in the image, how can I suppress that?

You can solve this by either increasing paddingRight of the whole chart or by setting axis.maxLabelPosition = 0.98 which would result last label to be hidden.

Related

Fixed space between candlesticks in amchart5 candlestick charts

Hi everyone I tried to set a fixed space between candles in amchart5 candlestick chart but I didn't find proper solution.
finally when my chart data grow my chart become like below picture
I want to set space between candles

D3 js: I want to know how to make a horizontal line according to the y-axis value

link : D3 Charting Tool: How to add label at right of target line (additional horizontal line) in column chart
I implemented the graph through this link.
The problem is that if there are multiple graphs and the y-axis values are different at the same height, if the horizon value is 10px, then 10px is output regardless of the y-axis range.
If i want to add horizontal lines according to the y-axis range, I'd like to know a solution.

amCharts 4 - How To Make Chart Widths Equal With Different Length ValueAxis Labels

In at least amCharts 4, the chart widths seem to be dependent on the length (e.g., the number of digits) of the valueAxis labels. For example, take the charts in this codepen. With the top chart labels set at a precision of 8 and the bottom chart having a max of 5 digits (e.g., "10,000" as the max), the width of the bottom chart can be made equal to the width of the top chart by including the following:
valueAxis2.marginLeft = "32px";
However, if the number of digits in the bottom chart's valueAxis labels changes, then the left margin is no longer correct. For example, uncomment line 22 to see this. How can the chart widths be made equal independently of the valueAxis label length?
This answer discusses a solution for amCharts 3, but there doesn't seem to be a minMarginLeft property in amCharts 4.
Good question. I highly recommend checking out our Working with Containers guide. The last section illustrates the pre-defined Containers for XYCharts.
Any y axes rendered on the left will be in the chart.leftAxesContainer, so you can set those to the same width on each chart, e.g.
// Top chart's left y axis is around 96px (checked via its measuredWidth)
chart1.leftAxesContainer.width = 100;
chart2.leftAxesContainer.width = 100;
Here's a fork:
https://codepen.io/team/amcharts/pen/a0a990fa6420b446508770ccae40ca7d
Screenshot (no playing with margins required!):

Bar Graph with Adaptive Captions

I would like to have a graph in amCharts where the x-axis is the time and bars represent in different colors and heights representing events in time. Now I would like to have that zoom-able so that captions in the bars only appear if there is enough space to display them.
In my example picture the caption is not displayed on the magenta bars:
:
I would try to do this with a date-based serial chart. You could try using a separate step line for each column with fillAlpha set to 1 or one step graph and use fillColorsField and set color in your data at a position where color should be changed. As for labels, it's more complicated - graph has hideLabelsCount property, but it will show/hide all labels once certain zoom level is reached. You could try employ labelFunction of a graph and usesome function which would set label to empty string, depending on zoom level.

Zoomable scatter chart

In Qlikview 11 I managed to set up (amongst others) a nice scatter chart without any major problems. Now I would like to be able to zoom into a region in that chart. Intuitively this could be accomplished by selecting a rectangular region with the mouse. Incidentally this works fine in "regular" line or bar charts. The new x and y axis regions correspond to the selected rectangle. However this does not happen with my scatter chart. I suspect this has something to do with the way dimensions are handled in scatter charts. For easier understanding I appended to screen-shots of the status quo - or how I don't want it to be.
Full chart with selected region http://img801.imageshack.us/img801/4873/6ccc.png
Chart displaying only the selected data http://imageshack.us/a/img138/9053/kck5.png
From what it looks like, I would guess that the scatter plot has hard coded axis max and mins. Check the "Axes" tab under chart properties, and uncheck the scale boxes. That should allow the chart to zoom in.

Resources