- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有 2 个图表,两个图表的 x 轴网格对齐,但如下图所示,下图中的条形图与 x 网格值不相关。当光标放在条形的最右侧时,它显示为(5 月 22 日),但显示的是网格(6 月 1 日),导致 10 天的视觉显示不准确。
请看这里的图片: https://drive.google.com/file/d/0B8yt1DOnKzVkRG5lNzFyM3M5MUk/edit?usp=sharing
3 多年前就提出了一个 bug,但看起来并没有解决。 Link to Bug我想知道是否有人有解决方法?
顶部图的代码如下所示: $(文档).ready(函数(){
pregnancyPlot = $.jqplot('pregnancyGraph', [[['2013-01-20 16:57',123,156,123,156],['2013-03-22 17:05',69,130,69,130],['2013-05-22 17:05',69,130,69,130],['2013-07-20 15:26',110,180,110,180],['2013-08-01 15:27',120,80,120,80],['2013-09-20 15:14',120,60,120,60],['2013-11-22 17:14',107,161,107,161],['2013-11-26 12:30',106,180,106,180]], [['2013-01-20 16:57',123],['2013-03-22 17:05',90],['2013-05-22 17:05',90],['2013-07-20 15:26',67],['2013-08-01 15:27',101],['2013-09-20 15:14',67],['2013-11-22 17:14',58],['2013-11-26 12:30',123]],[['2013-01-20 16:57', 83.40],['2013-03-22 17:05', 75.00],['2013-05-22 17:05', 75.00],['2013-08-01 15:27', 103.00],['2013-09-20 15:14', 102.00],['2013-11-22 17:14', 98.00],['2013-11-26 12:30', 200.00]], [['2013-01-20 16:57', 2.50, 4],['2013-03-22 17:05', 4.00, 4],['2013-05-22 17:05', 4.00, 4],['2013-09-20 15:14', 2.50, 4],['2013-11-22 17:14', 2.70, 4],['2013-11-26 12:30', 2.50, 4]]], {
title:'Pregnancy Readings',
height: 300,
width: 600,
gridPadding: {top:20, bottom:0, left:80, right:0},
series: [
{renderer:$.jqplot.OHLCRenderer, rendererOptions:{candleStick:true, fillUpBody:true, fillDownBody:true, bodyWidth:4}, color:'red', label: 'B.P'},
{renderer:$.jqplot.LineRenderer, color: 'black', label: 'Pulse'},
{renderer:$.jqplot.LineRenderer, showLine:false, markerOptions: { style:'filledDiamond', size:'15' }, color: '#00006B', label: 'Weight'},
{renderer:$.jqplot.BubbleRenderer, yaxis:'y2axis', rendererOptions: {autoscaleBubbles: false, varyBubbleColors: false}, color: '#FFA319', label: 'SF Height'}
],
axesDefaults:{
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions: {
angle: -30,
fontSize: '10pt',
showMark: false,
}
},
axes: {
xaxis: {
autoscale:false,
renderer:$.jqplot.DateAxisRenderer,
showTicks: false,
},
yaxis:{
autoscale:false,
renderer: $.jqplot.LinearAxisRenderer
},
y2axis:{
autoscale:true,
label: 'SF Height',
renderer: $.jqplot.LinearAxisRenderer,
rendererOptions: {
alignTicks: true,
}
},
},
legend: {
show: true,
placement: 'outside',
location: 'nw'
},
highlighter: {
show: true,
showMarker: false,
sizeAdjust: 7.5,
yvalues: 2,
},
cursor: {
show: true,
zoom: true
}
});
});
底部图的代码(未正确对齐的)如下所示: $(文档).ready(函数(){
urinePlot = $.jqplot('urineGraph', [[['2013-01-20', 50 ],['2013-07-20', 50 ],['2013-09-20', 50 ]], [['2013-03-22', 50 ],['2013-05-22', 50 ],['2013-11-22', 50 ],['2013-11-26', 50 ]]], {
height: 100,
width: 600,
gridPadding: {top:0, bottom:60, left:80, right:0},
series: [
{renderer:$.jqplot.BarRenderer, rendererOptions: {fillToZero: true, barWidth: 15}, color: 'green', label: 'Unine Normal'},
{renderer:$.jqplot.BarRenderer, rendererOptions: {fillToZero: true, barWidth: 15}, color: 'red', label: 'Unine Abnormal'}
],
axesDefaults:{
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions: {
angle: -30,
fontSize: '10pt',
showMark: false,
}
},
axes: {
xaxis: {
autoscale:false,
label: '',
renderer:$.jqplot.DateAxisRenderer,
tickOptions:{
formatString:'%d %b %Y'
}
},
yaxis:{
renderer: $.jqplot.LinearAxisRenderer,
showTicks: false,
},
},
highlighter: {
show: true,
showMarker: false,
sizeAdjust: 7.5
},
legend: {
show: true,
placement: 'outside',
location: 'nw'
},
cursor: {
show: true,
zoom: true
}
});
});
非常感谢。
最佳答案
最后,我使用了 OHLCRenderer 并通过将下限值设置为零并将上限值设置为将输入到 BarRenderer 中的值并设置主体宽度,使其表现得像 BarRenderer。
顶部图的代码现在如下所示:
$(document).ready(function () {
pregnancyPlot = $.jqplot('pregnancyGraph', [[['2013-12-01 10:36',110,180,110,180],['2013-12-08 17:16',80,185,80,185]], [['2013-12-01 10:36',123],['2013-12-08 17:16',67]],[['2013-12-01 10:36', 105.00],['2013-12-08 17:16', 105.00]], [['2013-12-01 10:36', 2.50, 4],['2013-12-08 17:16', 2.70, 4]]], {
title:'Pregnancy Readings',
height: 300,
width: 600,
gridPadding: {top:20, bottom:0, left:80, right:0},
series: [
{renderer:$.jqplot.OHLCRenderer, rendererOptions:{candleStick:true, fillUpBody:true, fillDownBody:true, bodyWidth:4}, color:'red', label: 'B.P'},
{renderer:$.jqplot.LineRenderer, color: 'black', label: 'Pulse'},
{renderer:$.jqplot.LineRenderer, showLine:false, markerOptions: { style:'filledDiamond', size:'15' }, color: '#00006B', label: 'Weight'},
{renderer:$.jqplot.BubbleRenderer, yaxis:'y2axis', rendererOptions: {autoscaleBubbles: false, varyBubbleColors: false}, color: '#FFA319', label: 'SF Height'}
],
axesDefaults:{
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions: {
angle: -30,
fontSize: '10pt',
showMark: false,
}
},
axes: {
xaxis: {
min:'2013-11-28',
max:'2013-12-11',
renderer:$.jqplot.DateAxisRenderer,
showTicks: false,
},
yaxis:{
autoscale:false,
renderer: $.jqplot.LinearAxisRenderer
},
y2axis:{
autoscale:true,
label: 'SF Height',
renderer: $.jqplot.LinearAxisRenderer,
rendererOptions: {
alignTicks: true,
}
},
},
legend: {
show: true,
placement: 'outside',
location: 'nw'
},
highlighter: {
show: true,
showMarker: false,
sizeAdjust: 7.5,
yvalues: 2,
},
cursor: {
show: true,
zoom: true
}
});
});
底部图的代码(现在正确对齐)如下所示:
$(document).ready(function () {
urinePlot = $.jqplot('urineGraph', [[['2013-12-01 10:36', 0,50,0,50]], [['2013-12-08 17:16', 0,50,0,50]]], {
height: 100,
width: 600,
gridPadding: {top:0, bottom:60, left:80, right:0},
series: [
{renderer:$.jqplot.OHLCRenderer, rendererOptions:{candleStick:true, fillUpBody:true, fillDownBody:true, bodyWidth:15}, color: 'green', label: 'Urine Normal'},
{renderer:$.jqplot.OHLCRenderer, rendererOptions:{candleStick:true, fillUpBody:true, fillDownBody:true, bodyWidth:15}, color: 'red', label: 'Urine Abnormal'}
],
axesDefaults:{
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions: {
angle: -30,
fontSize: '10pt',
showMark: false,
}
},
axes: {
xaxis: {
min:'2013-11-28',
max:'2013-12-11',
label: '',
renderer:$.jqplot.DateAxisRenderer,
tickOptions:{
formatString:'%d %b %Y'
}
},
yaxis:{
min:0,
max:50,
renderer: $.jqplot.LinearAxisRenderer,
showTicks: false,
},
},
highlighter: {
show: true,
showMarker: false,
sizeAdjust: 7.5
},
legend: {
show: true,
placement: 'outside',
location: 'nw'
},
cursor: {
show: true,
zoom: true
}
});
});
关于html - JQPlot BarRenderer 日期不与图轴对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20236536/
我试图了解当未指定宽度时 jqplot 如何计算条的宽度。假设我有以下图表: $.jqplot(chartDiv.attr("id"), [ [ ['2013-02-15',
我是 jqplot 的新手,当我想绘制条形图时,x 轴是日期,间隔是 1 天。这是我的代码的一部分: axesDefaults:{
我正在使用 jqPlot创建一个 Y 轴从 0% 到 100% 的线性图表。我遇到的问题是其中一个值落在 X 轴上(为 0%)或 100%,它被轴或图表的边界截断。 如何确保不会发生这种情况,同时将
这是否已包含在 jqPlot 中,或者是否存在可以执行此操作的库? 我敢肯定,如果我投入 12 个小时,我就能解决这个问题,但我只是觉得我会问。 :) 最佳答案 我还没有在 jqPlot 中看到过这样
我刚刚开始使用 jqPlot 绘制具有多个系列的折线图。看起来不错。 我添加了 Cursor 插件,目的是在 x 轴上的最近 数据点上显示一条垂直线。换句话说,它捕捉到最近的点。然而,Cursor 插
有没有办法根据条形图中的阈值设置/更改条形颜色。 变量 s1 = [460, -260, 690, 820]; 对于上面指定的值,低于 -200 的条(-260 的条)应该是红色的。有没有办法在 jq
我正在 jqPlot 中使用条形图,我需要在图表上用单独的线显示平均值。我的问题是如何做到这一点?我需要为此使用折线图吗?我看过一些折线图示例,但它们在条形图中显示为趋势,从图表上的第一个条形开始,而
我有一个条形图,在某个点 x 轴显示 35 多个项目,代表图表上的单个条形图。 问题:保持图表背景大小与当前一样,每个条形图变得非常窄并且显示阴影,造成视觉干扰。所以我试图从图表中删除阴影。 尝试过:
我正在用 jqPlot 绘制图表,在我的模板中,我设计了图表,使其向下生长,有点翻转条形,使它们从顶部开始向下移动,这取决于来自数据库的一些输入。我想乘以-1,但似乎行不通。 有什么建议?这是我的代码
我正在尝试以编程方式打开和关闭 pointLabels。我认为它会像这样工作: var data_ = [[1,1],[2,5],[4,9]]; var graph = $.jqplo
我有一个多系列图表,不仅要突出显示点的 x 和 y 坐标,还要突出显示 series 名称。 可能吗? 最佳答案 我发现最简单的方法是这样的: $.jqplot('chart-id', values,
我对其中一个 jqPlot 插件文件 (jqplot.highlighter.js) 做了一些更改,我想在部署前将其缩小。 有谁知道 jqPlot 开发人员使用什么工具来缩小他们的 jqPlot 相关
当光标悬停到 JQPlot 的 Bar 时,我想将光标更改为“指针”。 我试图改变 CSS。但它没有用。请帮我。 最佳答案 您需要 - 正如您所尝试的那样 - 使用 CSS 修改它。 您可能没有在正确
一直在搜索,找不到我正在寻找的东西。需要将多个系列加载到一个 jqplot 中,每个系列都来自自己的数据文件。 这里的例子http://www.jqplot.com/tests/data-render
当使用 jqPlot 绘制图形时,我有包含正值和负值的曲线,因此穿过 x 轴。我想强调 0 处的 x 轴,以便更清楚地区分正值和负值。有办法做到这一点吗? 在我使用示例曲线的代码下方: $.jqplo
有人遇到过吗?我对此很陌生,所以我不确定这里到底发生了什么。但我正在尝试根据文档使用 jqplot 的仪表,但它似乎没有用。我可以很好地创建条形图、折线图等图表。 包括必要的脚本链接(以及其他需要的链
与this question完全相同,但由于我没有赞成它的声誉(也无法回答),我将不得不再次询问...... 给定如下图,我如何强制刻度始终为整数,即使该图为空?目前,如果图表没有数据,它将变为 0,
我可以使用 EnhancedLegendRenderer 插件获得 jqplot 图的水平图例。但是我需要图底部的水平图例。有什么建议吗? 最佳答案 在发布到堆栈溢出时,您应该始终显示一些工作。它有助
嗨,我正在使用 jqplot,有没有办法缩短数字轴上的刻度标签。假设有一个像这样的 y 系列 [100,250,125000000,14000000,300,..]。这里根据最大值轴被缩放并用大刻度值
我想使用 jqPlot 在页面上创建 3 个单独的图表,是否可以配置 jqPlot 以便当光标在一个图表上移动时,垂直线也会在其他图表上移动? 最佳答案 我还需要同时跟踪 2 个图表上的一条垂直线,并
我是一名优秀的程序员,十分优秀!