Skip to content

Added support for 'hidden' config properties to hide DataSet by default #22

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

simonc92
Copy link

I wanted to hide a specific dataset inside my django-jchart but hidden wasn't supported.

ValueError at / Use of illegal keyword arguments for DataSet: {'hidden'}

This tiny code enhancement enables this feature. After loading the page the dataset I wanted to be hidden was hidden and you have to click to show the chart.

Code exmple:

from jchart import Chart

class LineChart(Chart):
    chart_type = 'line'

    def get_datasets(self, **kwargs):
        return [{
            'label': "My Dataset",
            'data': [69, 30, 45, 60, 55],
            'hidden': True
        }]

@coveralls
Copy link

Coverage Status

Coverage remained the same at 95.354% when pulling f9b2ddc on simon-czychy:master into 2e224f0 on matthisk:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants