Template to enable x and y-grid by default
()
| 669 | |
| 670 | |
| 671 | def gridon(): |
| 672 | """ |
| 673 | Template to enable x and y-grid by default |
| 674 | """ |
| 675 | # Create blank template |
| 676 | template = Template() |
| 677 | template.layout.xaxis.showgrid = True |
| 678 | template.layout.xaxis.title.standoff = 15 |
| 679 | template.layout.yaxis.showgrid = True |
| 680 | template.layout.yaxis.title.standoff = 15 |
| 681 | |
| 682 | # Automargin for pie chart |
| 683 | template.data.pie = [{"automargin": True}] |
| 684 | |
| 685 | return template |
| 686 | |
| 687 | |
| 688 | builders["gridon"] = gridon |