highcharts-zh_CN.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. (function (H) {
  2. var protocol = window.location.protocol;
  3. var defaultOptionsZhCn = {
  4. lang: {
  5. contextButtonTitle: "图表导出菜单",
  6. decimalPoint: ".",
  7. downloadJPEG: "下载JPEG图片",
  8. downloadPDF: "下载PDF文件",
  9. downloadPNG: "下载PNG文件",
  10. downloadSVG: "下载SVG文件",
  11. drillUpText: "返回 {series.name}",
  12. invalidDate: "无效的时间",
  13. loading: "加载中...",
  14. months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
  15. noData: "没有数据",
  16. numericSymbols: null,
  17. printChart: "打印图表",
  18. resetZoom: "重置缩放比例",
  19. resetZoomTitle: "重置为原始大小",
  20. shortMonths: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
  21. thousandsSep: ",",
  22. weekdays: ["星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
  23. rangeSelectorFrom: "开始时间",
  24. rangeSelectorTo: "结束时间",
  25. rangeSelectorZoom: "范围",
  26. zoomIn: "缩小",
  27. zoomOut: "放大"
  28. },
  29. global: {
  30. canvasToolsURL: protocol + "//cdn.hcharts.cn/highcharts/modules/canvas-tools.js",
  31. VMLRadialGradientURL: protocol + +"//cdn.hcharts.cn/highcharts/gfx/vml-radial-gradient.png"
  32. },
  33. title: {text: "图表标题"},
  34. tooltip: {
  35. dateTimeLabelFormats: {
  36. millisecond: "%H:%M:%S.%L",
  37. second: "%H:%M:%S",
  38. minute: "%H:%M",
  39. hour: "%H:%M",
  40. day: "%Y-%m-%d",
  41. week: "%Y-%m-%d",
  42. month: "%Y-%m",
  43. year: "%Y"
  44. }, split: false
  45. },
  46. exporting: {url: protocol + "//export.highcharts.com.cn"},
  47. credits: {text: "", href: ""},
  48. xAxis: {
  49. dateTimeLabelFormats: {
  50. millisecond: "%H:%M:%S.%L",
  51. second: "%H:%M:%S",
  52. minute: "%H:%M",
  53. hour: "%H:%M",
  54. day: "%Y-%m-%d",
  55. week: "%Y-%m",
  56. month: "%Y-%m",
  57. year: "%Y"
  58. }
  59. },
  60. rangeSelector: {
  61. inputDateFormat: "%Y-%m-%d",
  62. buttonTheme: {width: "auto", style: {fontSize: "12px", padding: "4px"}},
  63. buttons: [{type: "month", count: 1, text: "月"}, {type: "month", count: 3, text: "季度"}, {
  64. type: "month",
  65. count: 6,
  66. text: "半年"
  67. }, {type: "ytd", text: "YTD"}, {type: "year", count: 1, text: "年"}, {type: "all", text: "所有"}]
  68. },
  69. plotOptions: {
  70. series: {
  71. dataGrouping: {
  72. dateTimeLabelFormats: {
  73. millisecond: ["%Y-%m-%d %H:%M:%S.%L", "%Y-%m-%d %H:%M:%S.%L", " ~ %H:%M:%S.%L"],
  74. second: ["%Y-%m-%d %H:%M:%S", "%Y-%m-%d %H:%M:%S", " ~ %H:%M:%S"],
  75. minute: ["%Y-%m-%d %H:%M", "%Y-%m-%d %H:%M", " ~ %H:%M"],
  76. hour: ["%Y-%m-%d %H:%M", "%Y-%m-%d %H:%M", " ~ %H:%M"],
  77. day: ["%Y-%m-%d", "%Y-%m-%d", " ~ %Y-%m-%d"],
  78. week: ["%Y-%m-%d", "%Y-%m-%d", " ~ %Y-%m-%d"],
  79. month: ["%Y-%m", "%Y-%m", " ~ %Y-%m"],
  80. year: ["%Y", "%Y", " ~ %Y"]
  81. }
  82. }
  83. },
  84. ohlc: {
  85. tooltip: {
  86. split: false,
  87. pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>' + "开盘:{point.open}<br/>" + "最高:{point.high}<br/>" + "最低:{point.low}<br/>" + "收盘:{point.close}<br/>"
  88. }
  89. },
  90. candlestick: {
  91. tooltip: {
  92. split: false,
  93. pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>' + "开盘:{point.open}<br/>" + "最高:{point.high}<br/>" + "最低:{point.low}<br/>" + "收盘:{point.close}<br/>"
  94. }
  95. }
  96. }
  97. };
  98. H.setOptions(defaultOptionsZhCn)
  99. })(Highcharts);