Zingchart - 图中隐藏了一些点

时间:2016-05-11 13:31:30

标签: javascript charts zingchart

我使用Zingchart绘制一些日志数据因此我需要显示图中的每个点。我在json中激活了points属性(参见



$scope.graphoptions = {
            theme:"dark",
            "gui":{
              behaviors:[]
            },

            globals: {
              shadow: false,
              fontFamily: "Helvetica"
            },
            type: "line",
            plot: {
              aspect: "segmented",
              marker: {}
            },
            "legend":{
              margin :"5% 88%",
              layout: "float",
              fontSize : "10px",
              backgroundColor: "#888888",
              borderColor : "#000000",
              shadowColor : "transparent",
              toggleAction: "hide",
              item: {
                markerStyle : "circle",
                fontColor: "#ffffff"
              },
            },
            scaleX: {
              zooming: true,
              item: {
                fontColor: "white"
              },
              guide: {
                visible: false
              },
              "transform": {
                "type": "date",
                "all": "%G:%i",
              }
            },

            "scaleY": {
              zooming:true,
              lineColor : "#DDD",
              tick : {
                lineColor : "#DDD"
              },
              item : {
                fontColor : "#DDD"
              },
              refLine : {
                lineColor : "#DDD"
              },
            },

            tooltip : {
              //we have to store the tooltip fkt globally so its ouside angulars
              //scope thatswhy we have to pass the data to the function
           	  jsRule : "applyTooltip("+$scope.fileName+")",
              shadow:false
           	},

            plotarea: {
              "adjust-layout":true,
              backgroundColor : '#272822'
            },
          }




表示完整的json)。

正如您在此屏幕截图中看到的那样graph without zoom

读取的图形的某些点被绘制但没有蓝色的点。 放大时:

Graph with Zoom

显示蓝图的某些标记。 这是一个错误还是我必须激活json中我不知道的其他属性。

提前致谢!

1 个答案:

答案 0 :(得分:4)

假设您的数据应该在这些点上绘制,那么您需要增加绘图上绘制的默认标记的数量。默认情况下,ZingChart根据点数和图表宽度计算此数字。

  • maxNodes: N其中N是您希望在给定点显示的最大节点数。例如maxNodes: 1000

  • 如果工具提示在精细分辨率下很重要,您还需要更改maxTrackers: N,其中N是要跟踪工具提示的节点数量。请注意,这会严重降低性能,具体取决于要跟踪的节点数。例如maxTrackers: 1000