highcahrts-zh_CN.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. /**
  2. * Highcharts-zh_CN ES6 版本 plugins v1.2.1 (2020-07-29)
  3. *
  4. * (c) 2020 Jianshu Technology Co.,LTD (https://jianshukeji.com)
  5. *
  6. * Author : john@jianshukeji.com, Blue Monkey
  7. *
  8. * License: Creative Commons Attribution (CC)
  9. */
  10. export default (H) => {
  11. let protocol = window.location.protocol;
  12. if (!/^http(s)?:&/.test(protocol)) {
  13. protocol = 'http:';
  14. }
  15. let defaultOptionsZhCn = {
  16. lang: {
  17. // Highcharts
  18. contextButtonTitle: '图表导出菜单',
  19. decimalPoint: '.',
  20. downloadJPEG: '下载 JPEG 图片',
  21. downloadPDF: '下载 PDF 文件',
  22. downloadPNG: '下载 PNG 文件',
  23. downloadSVG: '下载 SVG 文件',
  24. downloadXLS: '下载 XLS 文件',
  25. drillUpText: '◁ 返回 {series.name}',
  26. exitFullscreen: '退出全屏',
  27. exportData: {
  28. categoryDatetimeHeader: '时间',
  29. categoryHeader: '类别',
  30. },
  31. openInCloud: '在 Highcharts Cloud 中打开',
  32. invalidDate: '无效的时间',
  33. loading: '加载中...',
  34. months: [
  35. '一月',
  36. '二月',
  37. '三月',
  38. '四月',
  39. '五月',
  40. '六月',
  41. '七月',
  42. '八月',
  43. '九月',
  44. '十月',
  45. '十一月',
  46. '十二月',
  47. ],
  48. navigation: {
  49. popup: {
  50. addButton: '新增',
  51. arrowLine: '直线',
  52. arrowRay: '射线',
  53. arrowSegment: '线段',
  54. background: '背景',
  55. backgroundColor: '背景颜色',
  56. backgroundColors: '背景颜色',
  57. borderColor: '边框颜色',
  58. borderRadius: '圆角',
  59. borderWidth: '边框大小',
  60. circle: '圆',
  61. color: '颜色',
  62. connector: '连接',
  63. crooked3: 'Crooked 3 line',
  64. crooked5: 'Crooked 5 line',
  65. crosshairX: '竖直准星线',
  66. crosshairY: '水平准星线',
  67. editButton: '编辑',
  68. elliott3: 'Elliott 3 line',
  69. elliott5: 'Elliott 5 line',
  70. fibonacci: '斐波纳契',
  71. fill: '填充颜色',
  72. flags: '标志',
  73. fontSize: '字体大小',
  74. format: '文本',
  75. height: '高度',
  76. horizontalLine: '水平线',
  77. infinityLine: '无限线',
  78. innerBackground: '内背景',
  79. label: '文字标签',
  80. labelOptions: '文字标签配置',
  81. labels: '文字标签',
  82. line: '线',
  83. lines: '线条',
  84. measure: 'Measure',
  85. measureX: 'Measure X',
  86. measureXY: 'Measure XY',
  87. measureY: 'Measure Y',
  88. name: '名字',
  89. outerBackground: '外背景',
  90. padding: '内间距',
  91. parallelChannel: '并行通道',
  92. pitchfork: '杈子',
  93. ray: '射线',
  94. rectangle: '矩形',
  95. removeButton: '删除',
  96. saveButton: '保存',
  97. segment: '段落',
  98. series: '数据列',
  99. shapeOptions: '图形配置',
  100. shapes: '图形',
  101. simpleShapes: '简单图形',
  102. stroke: '线条颜色',
  103. strokeWidth: '线条粗细',
  104. style: '样式',
  105. title: '标题',
  106. tunnel: '通道',
  107. typeOptions: '详情',
  108. verticalArrow: '竖直箭头',
  109. verticalCounter: '竖直计数器',
  110. verticalLabel: '竖直标签',
  111. verticalLine: '竖直线',
  112. volume: '成交量',
  113. },
  114. },
  115. noData: '暂无数据',
  116. numericSymbols: null,
  117. printChart: '打印图表',
  118. resetZoom: '重置缩放比例',
  119. resetZoomTitle: '重置为原始大小',
  120. shortMonths: [
  121. '一月',
  122. '二月',
  123. '三月',
  124. '四月',
  125. '五月',
  126. '六月',
  127. '七月',
  128. '八月',
  129. '九月',
  130. '十月',
  131. '十一月',
  132. '十二月',
  133. ],
  134. thousandsSep: ',',
  135. viewData: '查看数据表格',
  136. viewFullscreen: '全屏查看',
  137. weekdays: [
  138. '星期天',
  139. '星期一',
  140. '星期二',
  141. '星期三',
  142. '星期四',
  143. '星期五',
  144. '星期六',
  145. ],
  146. viewData: '查看数据表格',
  147. // Highstock
  148. rangeSelectorFrom: '开始时间',
  149. rangeSelectorTo: '结束时间',
  150. rangeSelectorZoom: '范围',
  151. // Highmaps
  152. zoomIn: '缩小',
  153. zoomOut: '放大',
  154. },
  155. global: {
  156. // 不使用 UTC时间
  157. useUTC: false,
  158. timezoneOffset: -8 * 60,
  159. canvasToolsURL:
  160. protocol + '//cdn.hcharts.cn/highcharts/modules/canvas-tools.js',
  161. VMLRadialGradientURL:
  162. protocol + +'//cdn.hcharts.cn/highcharts/gfx/vml-radial-gradient.png',
  163. },
  164. exporting: {
  165. url: protocol + '//export.highcharts.com.cn',
  166. },
  167. credits: {
  168. text: 'Highcharts.com.cn',
  169. href: 'https://www.highcharts.com.cn',
  170. },
  171. /**
  172. * Highstock
  173. */
  174. rangeSelector: {
  175. inputDateFormat: '%Y-%m-%d',
  176. buttons: [
  177. {
  178. type: 'month',
  179. count: 1,
  180. text: '月',
  181. },
  182. {
  183. type: 'month',
  184. count: 3,
  185. text: '季度',
  186. },
  187. {
  188. type: 'month',
  189. count: 6,
  190. text: '半年',
  191. },
  192. {
  193. type: 'ytd',
  194. text: 'YTD',
  195. },
  196. {
  197. type: 'year',
  198. count: 1,
  199. text: '年',
  200. },
  201. {
  202. type: 'all',
  203. text: '所有',
  204. },
  205. ],
  206. },
  207. plotOptions: {
  208. series: {
  209. dataGrouping: {
  210. dateTimeLabelFormats: {
  211. /* millisecond: [
  212. '%Y-%m-%d %H:%M:%S.%L',
  213. '%Y-%m-%d %H:%M:%S.%L',
  214. ' ~ %H:%M:%S.%L',
  215. ],
  216. second: ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S', ' ~ %H:%M:%S'],
  217. minute: ['%Y-%m-%d %H:%M', '%Y-%m-%d %H:%M', ' ~ %H:%M'],
  218. hour: ['%Y-%m-%d %H:%M', '%Y-%m-%d %H:%M', ' ~ %H:%M'], */
  219. day: ['%Y/%m/%d', '%Y/%m/%d', ' ~ %Y/%m/%d'],
  220. week: ['%Y/%m/%d', '%Y/%m/%d', ' ~ %Y/%m/%d'],
  221. month: ['%Y/%m', '%Y/%m', ' ~ %Y/%m'],
  222. year: ['%Y', '%Y', ' ~ %Y'],
  223. },
  224. },
  225. },
  226. },
  227. };
  228. H.setOptions(defaultOptionsZhCn);
  229. };