Skip to content

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

Open
simonc92 wants to merge 1 commit intomatthisk:masterfrom
simonc92:master
Open

Added support for 'hidden' config properties to hide DataSet by default#22
simonc92 wants to merge 1 commit intomatthisk:masterfrom
simonc92:master

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