2012-11-08 33 views
0

我的RGraph x轴上有这些奇怪的标记。任何想法是什么导致它?RGraph:x轴上的奇怪标记

下面是截图(我标有红色箭头的不必要的引号)

screenshot

这里是打印线我的JavaScript代码。

function PrintLine(labels, tooltips, data, color, legend) { 
    var line = new RGraph.Line(CANVAS_ID, data); 

    line.Set('chart.labels', labels); 
    line.Set('chart.background.grid.hlines', false); 
    line.Set('chart.background.grid.autofit.numvlines', labels.length-1); 
    if(legend[0].length > 0) { 
    line.Set('chart.colors', legend[0]); 
    line.Set('chart.key', legend[1]); 
    line.Set('chart.key.position', 'gutter'); 
    line.Set('chart.key.position.gutter.boxed', false); 
    line.Set('chart.key.position.x', 400); 
    } 

    line.Set('chart.tooltips', tooltips); 
    line.Set('chart.shadow', true); 
    line.Set('chart.ylabels', false); 
    line.Draw(); 
} 

回答

1

看起来好像你可能有一个以前的图表周围停留 - 您可以通过清除ObjectRegistry类摆脱:

RGraph.ObjectRegistry.Clear();

+0

在此还看到:HTTP://stackoverflow.com/questions/10853678/ rgraph重载最先前图的时候,我重装最页和我点击最身体的/ 10855605#10855605 – Richard

0

刻度线你想 .SET( 'chart.numxticks',N),调整线路设置chart.numxticks X的数量