testData.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. const coord1 = '[1,2]';
  20. const coord2 = '[3,4]';
  21. export const geom1 = `{"type":"Point","coordinates":${coord1}}`;
  22. export const geom2 = `{"type":"Point","coordinates":${coord2}}`;
  23. export const nonTimeSeriesChartData: any = [
  24. {
  25. geom: geom1,
  26. my_value: 'apple',
  27. my_count: 347,
  28. },
  29. {
  30. geom: geom1,
  31. my_value: 'apple',
  32. my_count: 360,
  33. },
  34. {
  35. geom: geom1,
  36. my_value: 'lemon',
  37. my_count: 335,
  38. },
  39. {
  40. geom: geom1,
  41. my_value: 'lemon',
  42. my_count: 333,
  43. },
  44. {
  45. geom: geom1,
  46. my_value: 'lemon',
  47. my_count: 353,
  48. },
  49. {
  50. geom: geom1,
  51. my_value: 'lemon',
  52. my_count: 359,
  53. },
  54. {
  55. geom: geom2,
  56. my_value: 'lemon',
  57. my_count: 347,
  58. },
  59. {
  60. geom: geom2,
  61. my_value: 'apple',
  62. my_count: 335,
  63. },
  64. {
  65. geom: geom2,
  66. my_value: 'apple',
  67. my_count: 356,
  68. },
  69. {
  70. geom: geom2,
  71. my_value: 'banana',
  72. my_count: 218,
  73. },
  74. ];
  75. export const timeseriesChartData = [
  76. {
  77. [geom1]: 347,
  78. [geom2]: 360,
  79. mydate: 1564275000000,
  80. },
  81. {
  82. [geom1]: 353,
  83. [geom2]: 328,
  84. mydate: 1564272000000,
  85. },
  86. ];
  87. export const groupedTimeseriesChartData = [
  88. {
  89. [`${geom1}, apple`]: 347,
  90. [`${geom2}, apple`]: 360,
  91. [`${geom1}, lemon`]: 352,
  92. [`${geom2}, lemon`]: 364,
  93. mydate: 1564275000000,
  94. },
  95. {
  96. [`${geom1}, apple`]: 353,
  97. [`${geom2}, apple`]: 328,
  98. [`${geom1}, lemon`]: 346,
  99. [`${geom2}, lemon`]: 333,
  100. mydate: 1564272000000,
  101. },
  102. ];
  103. export const groupedTimeseriesLabelMap = {
  104. [`${geom1}, apple`]: [geom1, 'apple'],
  105. [`${geom2}, apple`]: [geom2, 'apple'],
  106. [`${geom1}, lemon`]: [geom1, 'lemon'],
  107. [`${geom2}, lemon`]: [geom2, 'lemon'],
  108. };