标签: jqplot

更新图表时不会导致内存泄漏的图表库

我想基于使用AJAX异步从服务器获取的数据来构建一个交互式刷新图表的页面.我真的很喜欢jqPlot,但是当试图定期更新图形时(通过调用replot(),没有页面刷新),它会导致巨大的浏览器内存泄漏.这似乎是所有主流浏览器上出现的众所周知的问题.

我没有尝试过Flotprotovis,但是快速的谷歌搜索显示他们似乎有同样的问题.

您是否知道任何JavaScript图表库在图表的多次更新后不会引入内存泄漏?

javascript charts memory-leaks jqplot

5
推荐指数
1
解决办法
2254
查看次数

jQplot可拖动

我在jQuery中使用jQplot并且我试图让这些点可以拖动.jqplot通过jqplot.dragable插件提供此功能

我应该说我是jQplot的新手,但我确实正确地绘制了我的信息.

我认为我正在使用可拖动性选项.(使用该链接并找到'dragable:'来查看示例),但我的代码中必定存在错误.


这是我的代码.任何帮助是极大的赞赏.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script language="javascript" type="text/javascript" src="javascript/jquery-1.5.2.min.js"></script>
<script language="javascript" type="text/javascript" src="javascript/jqplot/jquery.jqplot.js"></script>
<script language="javascript" type="text/javascript" src="javascript/jqplot/plugins/jqplot.highlighter.js"></script>
<script language="javascript" type="text/javascript" src="javascript/jqplot/plugins/jqplot.dateAxisRenderer.js"></script>
<script language="javascript" type="text/javascript" src="javascript/jqplot/plugins/jqplot.barRenderer.js"></script>
<script language="javascript" type="text/javascript" src="javascript/jqplot/plugins/jqplot.dragable.js"></script>

<style type="text/css">
.jqplot-axis {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 90%; 
}
.jqplot-highlighter-tooltip {
    background-color: #CCC;
    padding: 5px;
    border-radius: 5px;
}
</style>

<script language="javascript" type="text/javascript">
$(function() {
    <?php 
        $series = ""; …
Run Code Online (Sandbox Code Playgroud)

javascript jquery charts jqplot

5
推荐指数
1
解决办法
2088
查看次数

jqPlot的JSON

我想使用来自服务器端的jqPlot usinge数据来自JSON,如本例中所述:http://www.jqplot.com/tests/data-renderers.php

我的代码几乎与示例相同:

function myGraph(jsonurl) {

  var ajaxDataRenderer = function(url, plot, options) {
    var ret = null;
    $.ajax({
      // have to use synchronous here, else the function
      // will return before the data is fetched
      async: false,
      url: url,
      dataType:"json",
      success: function(data) {
        ret=data;
        console.warn(data);
      }
    });
    return ret;
  };



var plot1 = $.jqplot('chartdiv', jsonurl, {
      title: 'myTitle',
      dataRenderer: ajaxDataRenderer,
      dataRendererOptions: {  unusedOptionalUrl: jsonurl    },
      series: [{
          label: 'myLabel',
          neighborThreshold: -1
      }],
      axes: {
          xaxis: {
              renderer: $.jqplot.DateAxisRenderer, …
Run Code Online (Sandbox Code Playgroud)

javascript arrays json getjson jqplot

5
推荐指数
1
解决办法
2万
查看次数

jqplot无法正确显示图例和y轴标签

我有一个使用jqplot和两行的线图.一行代表最大值,另一行代表最小值.我的代码图例无法正确显示,y轴标签与y轴重叠,我做错了什么?谢谢你的帮助!

[编辑] Jqplot版本是jquery.jqplot.1.0.0b2_r1012

我的代码显示此图表:

我的代码显示此图表

我想要一个像这个 图像中的传奇

这是我的代码:

<link rel="stylesheet" type="text/css" hrf="../plugins/jqplot/jquery.jqplot.min.css" />
<script type="text/javascript" src="../plugins/jqplot/jquery.min.js"></script>
<script type="text/javascript" src="../plugins/jqplot/jquery.jqplot.min.js"></script>
<script type="text/javascript" src="../plugins/jqplot/plugins/jqplot.canvasTextRenderer.min.js"></script>
<script type="text/javascript" src="../plugins/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js"></script>
<script type="text/javascript" src="../plugins/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js"></script>
<script type="text/javascript" src="../plugins/jqplot/plugins/jqplot.canvasOverlay.min.js"></script>
<script>
  $(document).ready(function(){               
          var maxPoints86 = [3.000000,4.000000,4.500000,5.000000,7.000000,7.000000,5.500000,8.500000,6.700000,5.200000,4.000000,5.500000,0.200000,7.500000,5.000000,5.200000,5.000000];
          var minPoints86 = [2.000000,1.000000,3.000000,4.000000,5.000000,4.800000,5.000000,6.000000,4.000000,2.500000,2.500000,5.000000,0.100000,6.000000,3.500000,5.000000,5.000000];

          var plot86 = $.jqplot('chart', [maxPoints86, minPoints86], 
          { 
              title:'Errores en facturación',
              axesDefaults: {
                labelRenderer: $.jqplot.CanvasAxisLabelRenderer
              },
              axes: {
                xaxis: {
                  label: "Monthly",
                },
                yaxis: {
                  label: "Percentage"
                }
              },
              legend: {
                show: true,
                location: 'se',
                labels:['Max','Min'],
                showSwatch: true,
                predraw: false, …
Run Code Online (Sandbox Code Playgroud)

label legend jqplot

5
推荐指数
1
解决办法
5471
查看次数

在 jqplot 中打开和关闭 pointLabels

我正在尝试以编程方式打开和关闭 pointLabels。我认为它会像这样工作:

    var data_ = [[1,1],[2,5],[4,9]];
    var graph = $.jqplot(id_graph, [data_], {
        series:[{pointLabels: { show:true } }]
        }
      );
    graph.series[0].pointLabels.show=false;
    graph.replot();
Run Code Online (Sandbox Code Playgroud)

但是,这仍然显示点标签。

谢谢你的帮助!

jqplot

5
推荐指数
1
解决办法
2221
查看次数

从jqplot中删除x和y轴线

我不想要jqplot上的X和Y轴线.这样的事情在此输入图像描述

我该怎么做到这一点.

我尝试了jqplot的各种选项,比如showGrid:false等......没什么用

graph bar-chart jqplot

5
推荐指数
1
解决办法
2992
查看次数

使用LogAxisRenderer更改轴刻度

我使用logAxisRenderer使用jqPlot绘制数据以具有两个对数轴.

除了两个问题外,一切都很好:

  1. jqPlot在0和1之间创建了大量空白空间.

  2. x轴上有两个零,因为我将数字格式化为"%'i"(一个用于0.0,一个用于0.5).

我尝试使用min:1和max:100000来隐藏空白区域和零区域.但这没效果.生成的绘图没有线,所有x轴标签都位于轴左侧的同一位置.

这是我用来创建这个图的代码:

$.jqplot(divId, [ line ], {
    title : title,
    series:[{showMarker:false}],
    axes : {
        xaxis : {
            label:'Users',
            renderer : $.jqplot.LogAxisRenderer,
            tickOptions:{
                tickDistribution: "power",
                formatString: "%'i"
            },
            labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
        },
        yaxis : {
            label:'Frequency',
            renderer : $.jqplot.LogAxisRenderer,
            tickOptions:{
                tickDistribution:"power",
                formatString: "%'i"
            },
            labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
        },
    },
});
Run Code Online (Sandbox Code Playgroud)

javascript formatting plot web-applications jqplot

5
推荐指数
1
解决办法
2014
查看次数

如何只在JqPlot而不是line中指向

我是JqPlot的新手.是否可以仅绘制点而不连接它们.因为我不希望它成为折线图.我只想在图表上分散点.

charts jqplot

5
推荐指数
1
解决办法
1525
查看次数

如何在jqplot中显示饼图外的标签?

Jqplot 的图表如下

在此处输入图片说明

jqplot图表

我的问题是如何在 a 之外显示标签jqplot chart,如下所示high chart

在此处输入图片说明

高图表可在此处获得fiddle

高图

<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
Run Code Online (Sandbox Code Playgroud)

如何实现在jqplot中用线条在图表外显示标签?

javascript css jquery jqplot

5
推荐指数
1
解决办法
4016
查看次数

jqplot多条/折线图对齐

我使用jqplot创建了以下图表.

在此输入图像描述

我想将蓝线与蓝色条形图对齐,红线与红色条形图对齐.对齐我的意思是折线图的"项目符号"(显示值)将与条形图水平对齐.

这可能吗?我知道如果我将条形图叠加在另一个上面就有可能.但如果我希望条形图显示在这里......那么它可能吗?

谢谢你的回答......

jquery charts rendering jqplot

5
推荐指数
0
解决办法
254
查看次数