简体   繁体   English

如何在jqPlot中格式化轴和日期?

[英]How to format axes and dates in jqPlot?

I have a page with 3 different charts. 我有一个包含3个不同图表的页面。 I'd like to make them look good. 我想让它们看起来不错。 Here's what it looks like: 看起来是这样的:

http://i.stack.imgur.com/JY0Yl.jpg http://i.stack.imgur.com/JY0Yl.jpg

As you can see there are several problems with the formatting here. 如您所见,此处的格式存在一些问题。

  1. How do I make the Y-axis labels align? 如何使Y轴标签对齐? In this case, they're right aligned, and the graph starts at the right. 在这种情况下,它们是右对齐的,并且图形从右侧开始。 So, since the labels are different, each of the graphs starts in a different column. 因此,由于标签不同,因此每个图形都从不同的列开始。
  2. How do i remove the first and last or the X-axis labels? 如何删除第一个和最后一个或X轴标签? In this case, two things happen. 在这种情况下,会发生两件事。 In one side, the label overlaps the Y-label, and on the other side, the label wraps around and uses two lines. 标签的一侧与Y标签重叠,另一侧,标签环绕并使用两条线。
  3. How do I space the graphs? 如何间隔图形? Each graph is its own DIV container, and it's jqPlot that decides to format it, and overrides my DIV formatting. 每个图都是其自己的DIV容器,并且是jqPlot决定对其进行格式设置,并覆盖我的DIV格式。

For point 3 you may be able to place each div inside an additional div that you will be able to format with CSS as you want. 对于第3点,您可以将每个div放在一个附加的div中,您可以根据需要使用CSS格式化该div。 And if it work you may reuse your hide X axis solution with a better result. 如果可行,您可以重用您的Hide X轴解决方案,从而获得更好的结果。

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

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