mirror of
https://github.com/getredash/redash.git
synced 2026-03-22 10:00:17 -04:00
* Prettier all the JS files * Add GitHub Action to autoformat code pushed to master * Fix eslint violation due to formatting. * Remove GitHub actions for styling * Add restyled.io config
34 lines
640 B
JavaScript
34 lines
640 B
JavaScript
import { merge } from "lodash";
|
|
import { registerVisualization } from "@/visualizations";
|
|
|
|
import Renderer from "./Renderer";
|
|
import Editor from "./Editor";
|
|
|
|
const DEFAULT_OPTIONS = {
|
|
controls: {
|
|
enabled: false, // `false` means "show controls" o_O
|
|
},
|
|
rendererOptions: {
|
|
table: {
|
|
colTotals: true,
|
|
rowTotals: true,
|
|
},
|
|
},
|
|
};
|
|
|
|
export default function init() {
|
|
registerVisualization({
|
|
type: "PIVOT",
|
|
name: "Pivot Table",
|
|
getOptions: options => merge({}, DEFAULT_OPTIONS, options),
|
|
Renderer,
|
|
Editor,
|
|
|
|
defaultRows: 10,
|
|
defaultColumns: 3,
|
|
minColumns: 2,
|
|
});
|
|
}
|
|
|
|
init.init = true;
|