简体   繁体   English

止损图栏宽度问题

[英]Flot Chart Bar Width Issue

One a page using database I am rendering multiple Bar Charts using Flot charts of Flat-kit Theme. 一个使用数据库的页面,我正在使用Flat-kit主题的Flot图表渲染多个条形图。 For a specific data set it gives me overlapped x-axis grid lines plus my bars are not rendered properly. 对于特定的数据集,它给了我重叠的x轴网格线,而我的条没有正确显示。

Kindly see the image where at top of each graph data and ticks are also echoed by me to help you find if there is any error with data or ticks 请查看图像,每个图形数据和刻度的顶部也会被我回显,以帮助您查找数据或刻度是否有错误

在此处输入图片说明

I assume you see the right chart in your image as improperly rendered. 我假设您在图像中看到正确的图表,渲染不正确。 But in fact it is rendered correctly for the data you have given. 但是实际上,它可以正确地呈现给定的数据。 Your x values and therefore also the x axis range from about 3060 to 3240 so each bar is pretty narrow. 您的x值以及x轴的范围从3060到3240,因此每个条形都非常窄。

If you want the bars to be at equal distance and the same width as in the left chart you have to use category mode (which basically means using x values from 1 to 10 as in the left chart). 如果希望条形图与左图中的等距距离和宽度相同,则必须使用类别模式 (这基本上意味着,如左图所示,使用从1到10的x值)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM