1.1.0 • Published 2 years ago

controlled-rising-skyline v1.1.0

Weekly downloads
38
License
MIT
Repository
github
Last release
2 years ago

The controlled rising Skyline chart

This library provides a rising skyline chart with an horizontal control panel control. This widget is linked to a dynamic history of buildings. An animation displays the rising of the skyline.

CI rising skyline License: MIT

This chart has been created for the project Fitzhì. In Fitzhì, the goal is to display the history of a rising applications portfolio, confronted to the turn-over risk on these applications.

On the top right corner of the skyline, two buttons, with one up and one down arrays, allow the end-user to zoom-in, or zoom-out the view.

A panel control is associated with the skyline. With this panel, you will be able to :

  • Pause, and restart the animation.
  • Accelerate or decelate the animation
  • Move the cursor, along the timeline.

This library requires these peer dependencies :

  • @angular/materia
  • @fortawesome/fontawesome-free
  • bootstrap
  • jquery@
  • rising-skyline

Controlled rising Skyline

Installing this library in your project ?

The most simple command npm install controlled-rising-skyline@latest will install this latest release

To import the module inside your application, just add the module ControlledRisingSkylineModule in your app.module.ts.

location :

import {ControlledRisingSkyline} from 'controlled-rising-skyline';

Install (if necessary) the fonts and the bootstrap styles in your project

@import '@fortawesome/fontawesome-free/css/all.css'; @import "bootstrap/dist/css/bootstrap.css";

For testing purpose, the service ControlledRisingSkylineService provides a random generator for testing purpose. Its name is randomSkylineHistory(skyline$: BehaviorSubject<Building[]>)

Using this library in your application ?

To include this component into a container, you just have to declare this section into your HTML template.

<controlled-rising-skyline
    [height] = "'370px'"
    [width] = "'1200px'"
    [margin] = "'10px'"
    [risingSkylineHistory$] = risingSkylineHistory$
    [speed] = 30
    [startingColor] = "'#28a745'"
    [endingColor] = "'#8B0000'"
    [sliderColor] = "'#0000FF'"
    [backgroundColor] = "'whiteSmoke'">
</controlled-rising-skyline>

The parameters are :

ParameterDecoratorComment
heightINPUTThe height of the component, with its unit of measure, hosting the skyline (such as '100px').
widthINPUTThe width of the component, with its unit of measure, hosting the skyline (such as '100px').
marginINPUTThe margin around the container.
risingSkylineHistory$INPUTAn observable which emits an unordered array of episodes of the skyline rising. This list will be ordered by default by id. Each episode is associated to a week in a year and contains an array of buildings, of different heights. The Building object is described below.
speedINPUT(Optional) The speed of the animation in ms. Default value is 30 ms per step
startingColorINPUT(Optional) The starting color in the index-range. (Each building has a property named index, and this index determines the color). Default color is red
endingColorINPUT(Optional) The ending color in the index-range. (Each building has a property named index, and this index determines the color). Default color is green
displayVerticalTitleINPUTboolean Should the vertical title on top of each building be drawn ? Or not ? Default value is false.
buildingMinimumHeightVerticalTitleINPUTDisplay the vertical title when the height of buildings reaches this value.
fontINPUTThis setting is used by the vertical title. This is Shorthand property for setting 'font-style', 'font-variant', 'font-weight', 'font-size', 'line-height', and 'font-family'. "italic 2em "Open Sans", sans-serif'" is a possible example.
onClickBuildingOUTPUTThe component will emit an event containing a BuildingSelected object, each time the user is clicking on a building.
onEnterBuildingOUTPUTThe component will emit an event containing a BuildingSelected object, each time the user is entering in a building.
onLeaveBuildingOUTPUTThe component will emit an event containing a BuildingSelected object, each time the user is leaving a building.
sliderColorINPUT(Optional) The color of the slider. Default color is violet
skylineBackgroundColorINPUT(Optional) The background color of the skyline container. Default color is transparent
controlBackgroundColorINPUT(Optional) The background color of the control panel. Default color is lightGrey

What is a building ?

In this component, the skyline is an array of buildings.

So a building is a piece of the skyline.

PropertytypeComment
idnumberthe identifier
widthnumberthe width of the building
heightnumberthe height of the building
yearnumberthe year of the building corresponding to this state of building
weeknumberthe week of the building corresponding to this state of building
indexnumberthe index of the building in the range of colors. Index range is from 0 to 100.
titlestringthe title of the building

What is a selected building ?

This component is emetting this object during mouse interaction.

PropertytypeComment
buildingBuildingthe building under the mouse pointer
eventMouseEventthe underlying mouse event
1.1.0

2 years ago

1.0.23

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.11

3 years ago

1.0.12

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago