Highstocks - 出口极端

时间:2014-10-13 08:09:20

标签: highcharts highstock

我有一个带双窗格的Highstock图表(顶部和底部)。我知道范围选择器将从xAxis极值读取以设置起始日期。

每次我添加一个系列,无论是顶部还是底部,我都必须调用:chart.xAxis [0] .setExtremes();为了让范围选择器能够刷新"从和到日期(如有必要)。

现在,当我必须为导出模块执行相同的步骤时,问题就出现了。在将其传递到本地导出服务器之前,如何将极限配置到我的选项数组中?目前,似乎当我执行导出时,From / To Date偶尔会与我使用xAxis.min和xAxis.max设置的不同。

感谢任何帮助/建议。谢谢。


UPDATE /编辑:

我目前正在使用以下选项生成我的图表。图表的xAx是根据xAxis'显示的。最小值和最大值1315756800000(2011年第12季度)和1338134400000(2012年第28季度)。但是,如果我要复制以下代码并在http://export.highcharts.com/上导出,则日期将于2011年11月11日至2012年5月27日。任何想法为什么?

{
  "series": [
    {
      "data": [
        {
          "y": 101.3,
          "x": 1315756800000
        },
        {
          "y": 101.4228571428,
          "x": 1316361600000
        },
        {
          "y": 101.4657142857,
          "x": 1316966400000
        },
        {
          "y": 101.47,
          "x": 1317571200000
        },
        {
          "y": 101.4714285714,
          "x": 1318176000000
        },
        {
          "y": 101.4628571428,
          "x": 1318780800000
        },
        {
          "y": 101.4657142857,
          "x": 1319385600000
        },
        {
          "y": 101.4542857142,
          "x": 1319990400000
        },
        {
          "y": 101.4628571428,
          "x": 1320595200000
        },
        {
          "y": 101.4557142857,
          "x": 1321200000000
        },
        {
          "y": 101.4614285714,
          "x": 1321804800000
        },
        {
          "y": 101.45,
          "x": 1322409600000
        },
        {
          "y": 101.4414285714,
          "x ": 1323014400000
        },
        {
          "y": 101.44,
          "x": 1323619200000
        },
        {
          "y": 101.4514285714,
          "x": 1324224000000
        },
        {
          "y": 101.4328571428,
          "x": 1324828800000
        },
        {
          "y": 101.4214285714,
          "x": 1325433600000
        },
        {
          "y": 101.4614285714,
          "x": 1326038400000
        },
        {
          "y": 101.4257142857,
          "x": 1326643200000
        },
        {
          "y": 101.4742857142,
          "x": 1327248000000
        },
        {
          "y": 101.4785714285,
          "x": 1327852800000
        },
        {
          "y": 101.4357142857,
          "x": 1328457600000
        },
        {
          "y": 101.3085714285,
          "x": 1329062400000
        },
        {
          "y": 101.3071428571,
          "x": 1329667200000
        },
        {
          "y": 101.1742857142,
          "x": 1330272000000
        },
        {
          "y": 101.1285714285,
          "x": 1330876800000
        },
        {
          "y": 101.3242857142,
          "x": 1331481600000
        },
        {
          "y": 101.4042857142,
          "x": 1332086400000
        },
        {
          "y": 101.4742857142,
          "x": 1332691200000
        },
        {
          "y": 101.4771428571,
          "x": 1333296000000
        },
        {
          "y": 101.48,
          "x": 1333900800000
        },
        {
          "y": 101.4771428571,
          "x": 1334505600000
        },
        {
          "y": 101.4642857142,
          "x": 1335110400000
        },
        {
          "y": 101.4628571428,
          "x": 1335715200000
        },
        {
          "y": 101.4871428571,
          "x": 1336320000000
        },
        {
          "y": 101.4757142857,
          "x": 1336924800000
        },
        {
          "y": 101.4785714285,
          "x": 1337529600000
        },
        {
          "y": 101.475,
          "x": 1338134400000
        }
      ],
      "color": "#5b0f00",
      "type": "line",
      "name": "series 1 (mRL)",
      "yAxis": "testAxis",
      "id": "testSeries1",
      "turboThreshold": 3000
    },
    {
      "name": "series 1 (mRL) Min Max Range",
      "type": "errorbar",
      "id": "primaryWATERLEVELmRLSeries_ErrorBar",
      "linkedTo": "testSeries1",
      "data": [
        [
          1315756800000,
          101.3,
          101.3
        ],
        [
          1316361600000,
          101.36,
          101.5
        ],
        [
          1316966400000,
          101.44,
          101.5
        ],
        [
          1317571200000,
          101.45,
          101.5
        ],
        [
          1318176000000,
          101.46,
          101.5
        ],
        [
          1318780800000,
          101.45,
          101.48
        ],
        [
          1319385600000,
          101.45,
          101.48
        ],
        [
          1319990400000,
          101.44,
          101.47
        ],
        [
          1320595200000,
          101.44,
          101.48
        ],
        [
          1321200000000,
          101.44,
          101.47
        ],
        [
          1321804800000,
          101.44,
          101.47
        ],
        [
          1322409600000,
          101.42,
          101.47
        ],
        [
          1323014400000,
          101.43,
          101.45
        ],
        [
          1323619200000,
          101.42,
          101.46
        ],
        [
          1324224000000,
          101.44,
          101.47
        ],
        [
          1324828800000,
          101.42,
          101.44
        ],
        [
          1325433600000,
          101.41,
          101.43
        ],
        [
          1326038400000,
          101.45,
          101.47
        ],
        [
          1326643200000,
          101.4,
          101.46
        ],
        [
          1327248000000,
          101.45,
          101.49
        ],
        [
          1327852800000,
          101.46,
          101.5
        ],
        [
          1328457600000,
          101.38,
          101.47
        ],
        [
          1329062400000,
          101.27,
          101.37
        ],
        [
          1329667200000,
          101.28,
          101.33
        ],
        [
          1330272000000,
          101.14,
          101.24
        ],
        [
          1330876800000,
          101.09,
          101.18
        ],
        [
          1331481600000,
          101.21,
          101.43
        ],
        [
          1332086400000,
          101.37,
          101.46
        ],
        [
          1332691200000,
          101.42,
          101.5
        ],
        [
          1333296000000,
          101.47,
          101.49
        ],
        [
          1333900800000,
          101.47,
          101.49
        ],
        [
          1334505600000,
          101.46,
          101.5
        ],
        [
          1335110400000,
          101.42,
          101.49
        ],
        [
          1335715200000,
          101.43,
          101.5
        ],
        [
          1336320000000,
          101.48,
          101.5
        ],
        [
          1336924800000,
          101.46,
          101.49
        ],
        [
          1337529600000,
          101.47,
          101.5
        ],
        [
          1338134400000,
          101.46,
          101.5
        ]
      ],
      "zIndex": "1000",
      "yAxis": "testAxis"
    },
    {
      "color": "",
      "type": "line",
      "name": "series 2",
      "yAxis": "testAxis",
      "id": "testSeries",
      "turboThreshold": 3000
    }
  ],
  "yAxis": [
    {
      "id": "testAxis",
      "labels": {
        "style": {
          "font": "8px Helvetica",
          "fontWeight": "normal"
        }
      },
      "title": {
        "enabled": true,
        "text": "axis label",
        "style": {
          "font": "8px Helvetica",
          "fontWeight": "normal"
        }
      },
      "top": "0%",
      "height": "100%",
      "opposite": true,
      "onGraph": "primary"
    }
  ],
  "legend": {
    "enabled": true,
    "itemStyle": {
      "font": "11px Helvetica",
      "fontWeight": "normal"
    }
  },
  "xAxis": {
    "min": 1315756800000,
    "max": 1338134400000
  },
  "navigator": {
    "enabled": true
  },
  "credits": {
    "enabled": false
  }
}

0 个答案:

没有答案