Shawn  Durgan

Shawn Durgan

1596819637

The Material-UI Chart Library You Didn’t Know You Have

I love using React with Material-UI to build my personal projects. The popular React UI library adheres to Google’s Material Design specification and comes with a plethora of highly customizable React components that make prototyping a breeze.

However, as comprehensive as the component collection Material-UI offers, I still find myself looking up third-party libraries whenever I want to draw a simple chart. Do I use RechartsVictoryNivo? Or React Vis? Why do I have to add a third-party dependency for a basic donut chart in the first place?

In this post, I will share my tips for building common charts by repurposing Material-UI prebuilt components.

Base Components

The Box component is infinitely customizable, with enough CSS styling, you can craft the component into anything your heart desires. The Skeletoncomponent can be manipulated into basic shapes with a quick set of properties. While it is possible to build our charts on top of either, my favorite components for building charts are LinearProgress and CircularProgress.

Pie and Donut

LinearProgress and CircularProgress components are commonly used as drop-in solutions for loading animation between page renders. They are also surprisingly versatile.

CircularProgress component essentially draws a circle repeatedly in a loop, where you can control the animation, the thickness of the line, and where that line ends. In other words, you can practically build any pie or donut-shaped chart.

import React from 'react';
import CircularProgress from '@material-ui/core/CircularProgress';

interface DonutProps {
  value: number;
  size: number;
};
const Donut: React.SFC<DonutProps> = ({
  value,
  size,
}) => {
  return (
    <CircularProgress
      size={`${size}%`}
      value={value}
      thickness={10}
      variant="static"
      color="primary"
    />
  );
};
export default Donut;

This simple functional component leverages the static variant of CircularProgress. The thickness is set to 10 so that it would appear in donut-shaped, and the value indicates the percentage of completeness of the circle.

If we increase the thickness to 22, the line would fill out the hollow center and turns it into a solid pie chart.

Image for post

#charts #prototyping #react #lean #material-ui #ui

What is GEEK

Buddha Community

The Material-UI Chart Library You Didn’t Know You Have
Shawn  Durgan

Shawn Durgan

1596819637

The Material-UI Chart Library You Didn’t Know You Have

I love using React with Material-UI to build my personal projects. The popular React UI library adheres to Google’s Material Design specification and comes with a plethora of highly customizable React components that make prototyping a breeze.

However, as comprehensive as the component collection Material-UI offers, I still find myself looking up third-party libraries whenever I want to draw a simple chart. Do I use RechartsVictoryNivo? Or React Vis? Why do I have to add a third-party dependency for a basic donut chart in the first place?

In this post, I will share my tips for building common charts by repurposing Material-UI prebuilt components.

Base Components

The Box component is infinitely customizable, with enough CSS styling, you can craft the component into anything your heart desires. The Skeletoncomponent can be manipulated into basic shapes with a quick set of properties. While it is possible to build our charts on top of either, my favorite components for building charts are LinearProgress and CircularProgress.

Pie and Donut

LinearProgress and CircularProgress components are commonly used as drop-in solutions for loading animation between page renders. They are also surprisingly versatile.

CircularProgress component essentially draws a circle repeatedly in a loop, where you can control the animation, the thickness of the line, and where that line ends. In other words, you can practically build any pie or donut-shaped chart.

import React from 'react';
import CircularProgress from '@material-ui/core/CircularProgress';

interface DonutProps {
  value: number;
  size: number;
};
const Donut: React.SFC<DonutProps> = ({
  value,
  size,
}) => {
  return (
    <CircularProgress
      size={`${size}%`}
      value={value}
      thickness={10}
      variant="static"
      color="primary"
    />
  );
};
export default Donut;

This simple functional component leverages the static variant of CircularProgress. The thickness is set to 10 so that it would appear in donut-shaped, and the value indicates the percentage of completeness of the circle.

If we increase the thickness to 22, the line would fill out the hollow center and turns it into a solid pie chart.

Image for post

#charts #prototyping #react #lean #material-ui #ui

UI Designer Vs UI Developer

Comparing UI Designers to UI Developers
User interface (UI) designers and developers are directly responsible for the consumer base’s experience using an application or software program. Designers specifically deal with the visual aspects of the program, while developers deal with the overall performance and functionality of the software.
To get in depth knowledge on UI, enrich your skills on UI online training Course

Responsibilities of UI Designers vs. UI Developers
UI designers and developers work in tandem to create a program or application that is easy to understand and operate by their customers or clients. Though there may be some occasional overlap in the duties within the workplace, their designated duties are quite clear and are dependent on the other. UI developers are responsible for the coding and programming in the conception of an application, specifically with regard to how the software operates at the hands of the user. UI designers are in charge of applying their understanding of the program operations to create a visual experience that is most compatible to the program’s functionality.

UI Designers
User interface designers are tasked with understanding the programming language of the application in creation so that they can conceptualize and craft visual aspects that will facilitate usage of the program. They are expected to understand computer programming as well as graphic design due to the demands of their work, since they are in charge of incorporating their designs into the program correctly. Their designs are implemented into the layout, which is typically drafted by the developers, while the style of their designs is contingent on the guidelines given by the directors. Once these designs are finished, they must implement them into the program and run a demo of it for the developers and directors to ensure they met the needs and expectations of the project while ensuring there aren’t any bugs caused from their designs. Get more skills from UI Training

Other responsibilities of UI designers are as follows:

  • Make drafts in graphic design and editing software
  • Select fonts and determine color schemes, for consistency
  • Proficiency in programming codes such as Java or CSS
  • Create storyboards and test runs of animated, visual concepts

UI Developers
User interface developers are responsible for the functional aspects of a software application, coding and programming throughout all stages of development with the clients and potential users of the application in mind. They usually begin the process by incorporating the clients’ expressed needs into a layout that is modified as progress is made. Once they get the general functions working, the designers will incorporate their visual conceptions into the layout to ensure that the first draft is operational. If there are any bugs or malfunctions to fix, the developers must troubleshoot and patch the application. While doing these tasks, they must take detailed notes of all the progress made to streamline any future updates made to the program, functionally or aesthetically. Learn more from ui design course

UI developers will also be responsible for:

  • Utilizing research data to improve or build onto the design of the application
  • Suggesting any software updates to improve functionality
  • Constructing diagrams that will aide other developers and programmers on the project
  • Performing test runs of the application

#ui design course #ui training #online ui training #ui online course #ui online training #advanced ui design course

UX designer ? UI designer ? UI Developer ?

The UX designer is someone who thinks about what should the user flow be like, which page should lead to which page, when should a confirm popup appear or not appear, should there be a listing page before or after a create-new page, should there be an address field in the page or geolocation is enough to serve the purpose? After brainstorming through each of these and several other questions, the UX designer comes up with something known as wireframes, which in simple terms is just a blueprint of the website/app.
This is image title

To get in-Depth knowledge on UI Design you can enroll for a live demo on UI online training

The UI designer then takes the wireframes and makes them beautiful, also ensuring that the workflow of the product is communicated well to the user. He will add the pixel level details to the wireframes. What should be the font used, what should be the background image, do we need a background image, what should be the foreground color, how big should be the submit button, does it make more sense to have the menu at the bottom of the screen, what should the logo look like? The job of a UI designer is answering all these and thereafter delivering static mockups, using may be Photoshop, Invision and many other design tools.

The UI developer is the one who puts these static mockups in “real code”. They might need skills like HTML CSS , precompilers(like sass or less) , UI frameworks (like bootstrap or foundation), or xml layouts( in case of android UI) or a combined knowledge of all of them with Javascript (in case of react, react native). The result is a beautiful set of screens/pages which can be actually rendered in a browser or a mobile device.Learn more from ui design course

#ui online course #ui design course #ui training #online ui training #ui courses online #ui design classes online

A Comprehensive Guide to UI

UI (USER INTERFACE)

UI or User Interface is the interface that is the access point where users interact with computers. It is also a way through which users can interact with a website or an application. UI design typically refers to graphical user interfaces but also includes others, such as voice-controlled ones, a keyboard, a mouse, and the appearance of a desktop.

UI design considers the look, feel, and interactivity of the product. Users judge the design on the basis of usability and likeability very swiftly, so a designer will focus on making each visual element look pleasurable and meaningful. The designer has to consider the color scheme, font imagery, spacing, responsiveness. Also, understanding the user’s context and mindset is crucial while making design decisions.

Types of user interfaces

The various types of user interfaces include:

  • graphical user interface (GUI
  • command line interface (CLI)
  • menu-driven user interface
  • touch user interface
  • voice user interface (VUI)
  • form-based user interface
  • natural language user interface

UI vs UX

Often confused a lot and understood one and the same thing terms UI and UX are related but not the same.

UX or User Experience describes the overall experience of the product and the UI only considers the appearance of the product. A UX designer’s work is to make the product usable and useful. UX means focusing on the whole user journey and the steps a user will take to attain a goal. UX designers will make wireframes without making any detailed design decisions for each wireframe. Once the wireframes are final they are handed over to UI designers to start adding emotions to it through design and animations.

UI is a part of UX which helps in making the user experience more pleasurable and user-centric. UI designer’s job is to make the product visually appealing and desirable. Where a UX designer will try to make a critical judgment on what feature to add and how to user will interact, a UI designer will make critical design decisions regarding those features. Like what should be the font, color scheme, and animations for the features and pages decided by the UX team.

Let’s take a scenario to see how UI designers and UX designers influence the same feature differently.

  • A UX designer will decide whether a page will have a top navigation bar, side navigation bar, or bottom. What links should be added to the bar and whether there will be a search bar in it or not.

  • A UI designer will decide what will be the color scheme of the navigation bar, whether to use icons or text in link buttons, what should be the font style, what animation to use when the user toggles navigation bar or switch between pages.

#scala #user interface (ui) #good design #principles of ui #ui #ui vs ux #user experience #user interface #ux #what is ui #what is ux

Einar  Hintz

Einar Hintz

1593235440

Visualizing data with NGX-Charts in Angular

Data Science, Data Analytics, Big Data, these are the buzz words of today’s world. A huge amount of data is being generated and analyzed every day. So communicating the insights from that data becomes crucial. Charts help visualize the data and communicate the result of the analysis with charts, it becomes easy to understand the data.

There are a lot of libraries for angular that can be used to build charts. In this blog, we will look at one such library, NGX-Charts. We will see how to use it in angular and how to build data visualizations.

What we will cover:

  1. Installing ngx-chart.

  2. Building a vertical bar graph.

  3. Building a pie chart.

  4. Building an advanced pie chart.

A brief introduction about NGX-Charts

NGX-Chart charting framework for angular2+. It’s open-source and maintained by Swimlane.

NGX-Charts does not merely wrap d3, nor any other chart engine for that matter. It is using Angular to render and animate the SVG elements with all of its binding and speed goodness and uses d3 for the excellent math functions, scales, axis and shape generators, etc. By having Angular do all of the renderings it opens us up to endless possibilities the Angular platform provides such as AoT, Universal, etc.

NGX-Charts supports various chart types like bar charts, line charts, area charts, pie charts, bubble charts, doughnut charts, gauge charts, heatmap, treemap, and number cards.

Installation and Setup

1. Install the ngx-chart package in your angular app.

npm install @swimlane/ngx-charts --save

2. At the time of installing or when you serve your application is you get an error:

ERROR in The target entry-point "@swimlane/ngx-charts" has missing dependencies: - @angular/cdk/portal

You also need to install angular/cdk

npm install @angular/cdk --save

3. Import NgxChartsModule from ‘ngx-charts’ in AppModule

4. NgxChartModule also requires BrowserAnimationModule. Import is inAppModule.

app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { NgxChartsModule }from '@swimlane/ngx-charts';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    NgxChartsModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Amazing! Now we can start using ngx-chart component and build the graph we want.

In the AppComponent we will provide data that the chart will represent. It’s a sample data for vehicles on the road survey.

#angular #angular 6 #scala #angular #angular 9 #bar chart #charting #charts #d3 charts #data visualisation #ngx #ngx charts #pie