constant.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.DEFAULT_OPTIONS = exports.MEDIAN_VIEW_ID = exports.QUANTILE_VIEW_ID = exports.MIN_MAX_VIEW_ID = exports.VIOLIN_VIEW_ID = exports.MEDIAN_FIELD = exports.QUANTILE_FIELD = exports.MIN_MAX_FIELD = exports.VIOLIN_SIZE_FIELD = exports.VIOLIN_Y_FIELD = exports.X_FIELD = void 0;
  4. var plot_1 = require("../../core/plot");
  5. var utils_1 = require("../../utils");
  6. exports.X_FIELD = 'x';
  7. exports.VIOLIN_Y_FIELD = 'violinY';
  8. exports.VIOLIN_SIZE_FIELD = 'violinSize';
  9. exports.MIN_MAX_FIELD = 'minMax';
  10. exports.QUANTILE_FIELD = 'quantile';
  11. exports.MEDIAN_FIELD = 'median';
  12. exports.VIOLIN_VIEW_ID = 'violin_view';
  13. exports.MIN_MAX_VIEW_ID = 'min_max_view';
  14. exports.QUANTILE_VIEW_ID = 'quantile_view';
  15. exports.MEDIAN_VIEW_ID = 'median_view';
  16. exports.DEFAULT_OPTIONS = (0, utils_1.deepAssign)({}, plot_1.Plot.getDefaultOptions(), {
  17. // 多 view 组成,一定要设置 view padding 同步
  18. syncViewPadding: true,
  19. // 默认核函数
  20. kde: {
  21. type: 'triangular',
  22. sampleSize: 32,
  23. width: 3,
  24. },
  25. // 默认小提琴轮廓样式
  26. violinStyle: {
  27. lineWidth: 1,
  28. fillOpacity: 0.3,
  29. strokeOpacity: 0.75,
  30. },
  31. // 坐标轴
  32. xAxis: {
  33. grid: {
  34. line: null,
  35. },
  36. tickLine: {
  37. alignTick: false,
  38. },
  39. },
  40. yAxis: {
  41. grid: {
  42. line: {
  43. style: {
  44. lineWidth: 0.5,
  45. lineDash: [4, 4],
  46. },
  47. },
  48. },
  49. },
  50. // 图例
  51. legend: {
  52. position: 'top-left',
  53. },
  54. // Tooltip
  55. tooltip: {
  56. showMarkers: false,
  57. },
  58. // 默认区域交互
  59. // interactions: [{ type: 'active-region' }],
  60. });
  61. //# sourceMappingURL=constant.js.map