See the Pen amCharts V4: Value axis (2) by amCharts ( on CodePen.24419 Here's a demo how it would look like, just to illustrate the point: Starting the scale at zero would make the columns for all three look almost identical, which would provide false impression to the user viewing the chart. For example, if we had some very large numbers with only a little fluctuation between them (i.e. This helps make the difference in values as prominent as possible. Normally, Value axis will not start at zero, but will start at a value just before the smallest value in currently displayed data. However, in some cases you might need to adjust it for better results for your specific requirements, or usage scenario. Now that we know how Value axis' scales work, let's look at how we can adjust it to our needs.ĭefault behavior for the Value axis is designed to provide best results "out-of-the-box". See the Pen amCharts V4: Value axis (1) by amCharts ( on CodePen.24419 Adjusting scale That's why the algorithm behind Value axis will intelligently try to adjust its scale to start at 3 and end at 7, with intermediate grid/label every 1, resulting in grid lines/labels at 3, 4, 5, 6, and 7. Naturally, a value axis starting with 3.5 and ending with 6.5, with intermediate numbers at some odd fractional increments would look awkward to say the least. The actual range of values is from 3.5 to 6.5. Furthermore, it will automatically try to intelligently adjust its scale so that its scale is represented by "pretty" numbers, while maintaining the best possible appearance of related series.įor example, if we have a line series with three values: 3.5, 6, and 6.5. Normally, a Value axis will automatically choose its scale (minimum and maximum value, as well as intermediate grid/value positions) based on the actual range of numeric values in currently displayed data. In such charts we will have two Value axes: horizontal and vertical. Some chart types, like Scatter/Bubble, will have data points represented by two numeric values: X (horizontal) and Y (vertical) value. In such chart each point (an elbow on a line series, or a column in a column series) is represented by a numeric value, and an some other value, either category or a date. In the most common serial chart scenario, you would have a vertical Value axis, and either a Category or Date axis, for horizontal dimension. Value axis ( ValueAxis) is used to depict a simple numeric value.
0 Comments
Leave a Reply. |