Code Monkey home page Code Monkey logo

myvic-components's Introduction

Table of Contents

About The Project

The My Victoria component library aims to enable the publication of accessible maps, charts and user interface (UI) elements to websites by content owners across Government. It includes a set of reusable UI components designed to integrate with DDI’s existing ecosystem of platforms and services; and supporting documentation and examples to assist with their usage.

All components have been designed to align to Victorian Government design standards and branding; and include features to improve their accessibility.

For a higher level overview of how to get started, see the Getting Started Guide

Component Overview

All components have been developed with Vue as part of the MyVic-Components repository and aligned to the existing Ripple component library. Components are published to NPM, ready to be used directly in any Vue JS application.

Vue CLI is recommended for bootstrapping a new standalone Vue JS application.

Ripple includes example Vue JS and Nuxt sites that can be used to bootstrap a web application for deployment to SDP.

Storybook examples with component documentation are available here

Installation

Installation is straightforward with NPM or Yarn. See the component listing for all available packages.

npm install @dpc-sdp/myvic-bar-chart --save

or

yarn add @dpc-sdp/myvic-bar-chart

Usage

All components are published to NPM as individual packages under the @dpc-sdp namespace, with a myvic- prefix. For example:

  • @dpc-sdp/myvic-map-core
  • @dpc-sdp/myvic-bar-chart

Components are intended to be used with Vue.js projects, and can be installed with NPM as follows:

npm install @dpc-sdp/myvic-map-core --save

And imported using ES6 style imports:

import { MyvicMapCore } from '@dpc-sdp/myvic-map-core'

Or using require as follows:

const MyvicMapCore = require("@dpc-sdp/myvic-map-core")

Or imported directly into an HTML page (see the UMD Bundle documentation for more information:

<script src="https://cdn.jsdelivr.net/npm/@dpc-sdp/myvic-bundle@dev/dist/myvic-bundle.js"></script>

Component Listing

Auto Complete

A component for displaying an autocomplete search with results. This component renders a text input that allows searching over a set of items. The filtered results will appear beneath the input as a selectable list.

Address Search

A component for looking up addresses in Victoria using an autocomplete search.

Area Search

A component for looking up different kinds of areas using an autocomplete search.

Bar Chart

A component for displaying a data-driven bar chart.

Line Chart

A component for displaying a data-driven line chart.

Pie Chart

A component for displaying a data-driven pie chart.

Tree Map

A component for displaying a data-driven tree map.

Data Block

A component for displaying a single data item as a block element.

Toggle List

A component for displaying a dynamic list of toggleable items.

Map

An interactive map component based on OpenLayers.

Map - Tile Layer

A component that provides support for OSM, XYZ, WMS and ArcGIS tiled map layers.

Map - Vector Layer

A component that provides support for vector sources such as WFS, ArcGIS Feature Server and GeoJSON files.

Map - Vector Tile Layer

A component that provides support for Mapbox Vector Tile sources.

Global

Shared styles, libraries and utility functions for use across MyVictoria components.

Bundled Examples

Examples showing how multiple components can be bundled together and interact with each other.

UMD Bundle

A bundle of MyVictoria components packaged as a UMD. Mainly intended for use in existing HTML sites that are not already using Vue or Webpack.

Deployment

Users of the My Victoria components are responsible for arranging their own web hosting. Some possible options include:

  • A Standalone Vue or Nuxt app can be self hosted on any standard web server.
  • Existing SDP Sites may be able to use the components via Drupal and Data Driven Component
  • A New SDP Site
  • Non Vue.js site using the UMD bundle

Data Hosting

The My Victoria components don't have any specific requirements for data hosting, other than that the data is online and can be parsed with JavaScript. If hosting is required, some existing options include:

Contributing

Check our CONTRIBUTING.md

Support

Digital Engagement, Department of Premier and Cabinet, Victoria, Australia is a maintainer of this package.

License

Distributed under the Apache 2.0 License. See LICENSE for more information.

Attribution

Single Digital Presence offers government agencies an open and flexible toolkit to build websites quickly and cost-effectively.


Logo

myvic-components's People

Contributors

anthony-malkoun avatar b-schiller avatar dependabot[bot] avatar dylankelly avatar fleetadmiralbutter avatar github-actions[bot] avatar hgaitanis avatar kurtfoster avatar lambry avatar nicksantamaria avatar richorama avatar samueldudley avatar tim-yao avatar vincentdigital avatar waitingallday avatar yeniatencio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

pipnidpc

myvic-components's Issues

Wrong format for values in the chart

Hi there.

We are using the chart library to create some charts for DPC. We received feedback from the person who is checking those charts.

There are two issues:

  1. If a value of the datasets is 7.0 the charts print that value as 7 in the chart but the value must be 7.0.

image

  1. The values that are shown in the charts (i.e. in every bar in a bar chart) don't have a thousand separator character (,). In this case the value should be 4,987.

image

As we are using the SDP library, is there any way you can help us with that? Also, these issues would apply for bar and line chars.

Map is not redrawn on zoom using Openlayers ^6.13.0

See https://digital-engagement.atlassian.net/browse/SRM-336 for context.

When the map at https://www.coronavirus.vic.gov.au/where-get-tested-covid-19 was updated to use [email protected] an issue was introduced when changing the zoom level.

Steps to recreate as below

  • Make sure Openlayers is updated to at least [email protected] (also tested and failing with 6.14.0)
  • Set screen resolution to 393px wide
  • Change zoom level using plus / minus zoom buttons

Result:

Map fails to redraw icons

Note: I'm unsure if this something unique to the coronavirus map or if part of dpc-sdp/myvic-map-core

100% values aren't properly seen in Bar Charts

Hi there.

We are using myvic storybook to create some charts. one of those charts is a horizontal Bar Chart that contains some values equal or close to 100%. Since the data format is set as percentage, when the maximum value is 100%, the values aren't seen completely as the image below shows:

image

That's how I could reproduce the issue on your documentation page. Although I made a tweak changing the data format of the chart to normal and it worked, our customer needs to have the values as %.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.