Files
redash/client/app/visualizations/pivot/index.js
Arik Fraimovich 56d3be2248 Prettier all the Javascript code & GitHub Action (#4433)
* 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
2019-12-11 17:05:38 +02:00

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;