mockChartQueries.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. import { VizType } from '@superset-ui/core';
  20. import { datasourceId } from './mockDatasource';
  21. export const sliceId = 18;
  22. export default {
  23. [sliceId]: {
  24. id: sliceId,
  25. chartAlert: null,
  26. chartStatus: 'rendered',
  27. chartUpdateEndTime: 1525852456388,
  28. chartUpdateStartTime: 1525852454838,
  29. latestQueryFormData: {},
  30. queryRequest: {},
  31. queriesResponse: [{}],
  32. triggerQuery: false,
  33. lastRendered: 0,
  34. form_data: {
  35. adhoc_filters: [],
  36. datasource: datasourceId,
  37. viz_type: VizType.Pie,
  38. slice_id: sliceId,
  39. slice_name: 'Genders',
  40. granularity_sqla: undefined,
  41. time_grain_sqla: undefined,
  42. since: '100 years ago',
  43. until: 'now',
  44. metrics: ['sum__num'],
  45. groupby: ['gender'],
  46. limit: 25,
  47. pie_label_type: 'key',
  48. donut: false,
  49. show_legend: true,
  50. labels_outside: true,
  51. color_scheme: 'bnbColors',
  52. where: '',
  53. having: '',
  54. filters: [],
  55. row_limit: 50000,
  56. metric: 'sum__num',
  57. compare_lag: '10',
  58. granularity: 'ds',
  59. markup_type: 'markdown',
  60. compare_suffix: 'o10Y',
  61. },
  62. },
  63. };