index.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
  20. import transformProps from './transformProps';
  21. import thumbnail from './images/thumbnail.png';
  22. import thumbnailDark from './images/thumbnail-dark.png';
  23. import example1 from './images/example1.jpg';
  24. import example1Dark from './images/example1-dark.jpg';
  25. import example2 from './images/example2.jpg';
  26. import example2Dark from './images/example2-dark.jpg';
  27. import controlPanel from './controlPanel';
  28. const metadata = new ChartMetadata({
  29. category: t('Ranking'),
  30. description: t(
  31. 'A polar coordinate chart where the circle is broken into wedges of equal angle, and the value represented by any wedge is illustrated by its area, rather than its radius or sweep angle.',
  32. ),
  33. exampleGallery: [
  34. { url: example1, urlDark: example1Dark },
  35. { url: example2, urlDark: example2Dark },
  36. ],
  37. name: t('Nightingale Rose Chart'),
  38. tags: [
  39. t('Legacy'),
  40. t('Advanced-Analytics'),
  41. t('Circular'),
  42. t('Multi-Layers'),
  43. t('Pattern'),
  44. t('Time'),
  45. t('Trend'),
  46. ],
  47. thumbnail,
  48. thumbnailDark,
  49. useLegacyApi: true,
  50. });
  51. export default class RoseChartPlugin extends ChartPlugin {
  52. constructor() {
  53. super({
  54. loadChart: () => import('./ReactRose'),
  55. metadata,
  56. transformProps,
  57. controlPanel,
  58. });
  59. }
  60. }