ramp4-pcar4 / story-ramp

Storytelling with interactive maps using RAMP
MIT License
4 stars 14 forks source link

Create DQVchart panels #44

Closed yileifeng closed 3 years ago

yileifeng commented 3 years ago

Implement chart panel component chart-panel.vue that properly displays a dqvchart given a defined config.

dan-bowerman commented 3 years ago

Hey team! Please add your planning poker estimate with ZenHub @JahidAhmed @RyanCoulsonCA @yileifeng

dan-bowerman commented 3 years ago

Here's an example of a DQV chart in CESI: https://indicators-map.canada.ca/App/Detail?id=0110913&GoCTemplateCulture=en-CA https://indicators-map.canada.ca/Detail_Pages/0110913.json

'data': {
    'name': 'Key Lake Operation',
    'province': 'Saskatchewan',
    'facilityGHGDetailLink': 'https://climate-change.canada.ca/facility-emissions/GHGRP-G10913-2019.html ',
    'facilityIndClassLink': 'http://www23.statcan.gc.ca/imdb/p3VD.pl?Function=getVD&TVD=307532&CVD=307548&CST=01012017&CLV=5&MLV=5&CPV=212291',
    'companyName': 'Cameco Corporation',
    'totalGHGemissions': '17.50',
    'facilityType': 'Uranium ore mining',
    'address': 'Saskatoon, Saskatchewan, S7M 1J3',
    'description': 'The graph shows the total greenhouse gas (GHG) emissions for the selected facility from 2004 to 2019. Large industrial GHG emitters that emit 10 kilotonnes (kt) or more of GHGs are required to submit a report under the Facility Greenhouse Gas Emissions Reporting Program administered by Environment and Climate Change Canada.'
}, 'charts': {
    'chart1': {
        'credits': {
            'enabled': false
        },
        'title': {
            'text': 'Greenhouse gas emissions, 2004 to 2019'
        },
        \t 'subtitle': {
            'text': 'Key Lake Operation, Cameco Corporation, Saskatchewan'
        },
        'yAxis': {
            'title': {
                'text': 'Kilotonnes of carbon dioxide equivalent'
            }
        },
        'plotOptions': {
            'column': {
                'pointPadding': 0,
                'borderWidth': 0
            }
        },
        'xAxis': {
            'categories': [2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019],
            'title': {
                'text': 'Year'
            }
        },
        'series': [{
            'name': 'Facility emissions (kilotonnes of carbon dioxide equivalent)',
            'data': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33.96, 23.08, 17.5],
            'type': 'column',
            'color': '#0f4c6a'
        }, {
            'name': 'Reporting threshold',
            'data': [100, 100, 100, 100, 100, 50, 50, 50, 50, 50, 50, 50, 50, 10, 10, 10],
            'type': 'line',
            \t 'step': 'center',
            'color': '#e8ba1f'
        }],
        'exporting': {
            'menuItemDefinitions': {
                'viewData': null
            }
        }
    }
}