Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable chart grid enable option #761

Merged
merged 12 commits into from
Sep 10, 2020
2 changes: 1 addition & 1 deletion packages/core/src/components/axes/grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class Grid extends Component {
const gridEnable = Tools.getProperty(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const gridEnable = Tools.getProperty(
const isGridEnabled = Tools.getProperty(

this.model.getOptions(),
"grid",
"enable"
"enabled"
);
if (!gridEnable) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!gridEnable) {
if (!gridEnable) {

return;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const legend: LegendOptions = {
*/
export const grid: GridOptions = {
// set enable to false will not draw grid and stroke of grid backdrop
enable: true,
enabled: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grid cannot be disabled by default

x: {
numberOfTicks: 15
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/interfaces/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export interface ThresholdOptions {
}

export interface GridOptions {
enable: boolean;
enabled?: boolean;
y?: {
numberOfTicks?: number;
};
Expand Down