1.1.0 • Published 2 years ago

rising-skyline v1.1.0

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

The Skyline chart

This library provides a rising skyline chart, i.e. a skyline widget, which is linked to a dynamic history of buildings.

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, two buttons, with one up and one down arrays, allow the end-user to zoom-in, or zoom-out the view.

Build_and_test License: MIT

Rising Skyline

Installing this library in your project ?

The most simple command npm install rising-skyline will install this library

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

location :

import {RisingSkyline} from 'rising-skyline';

Using this library in your application ?

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

<rising-skyline
	[height] = "'370px'"
	[width] = "'90%'"
	[margin] = "'10px'"
	[risingSkylineHistory$] = risingSkylineHistory$
	[speed] = 30
	[startingColor] = "'#28a745'"
	[endingColor] = "'#8B0000'"
	[displayVerticalTitle] = true
	[font] = "'20px/1 Arial'"
	(onClickBuilding)="onClickBuilding($event)"
	(onEnterBuilding)="onEnterBuilding($event)"
	(onLeaveBuilding)="onLeaveBuilding($event)">
</rising-skyline>

The parameters are :

ParameterDecoratorComment
heightINPUTThe height of the container, with its unit of measure, hosting the skyline (such as '100px').
widthINPUTThe width of the container, with its unit of measure, hosting the skyline (such as '100px').
speedINPUTThe speed of the animation in ms.
marginINPUTThe margin around the container.
startingColorINPUTThe starting color in the index-range. (Each building has a property named index, and this index determines the color).
endingColorINPUTThe ending color in the index-range. (Each building has a property named index, and this index determines the color).
displayVerticalTitleINPUT(Optional) boolean Should the vertical title on top of each building be drawn ? Or not ? Default value is false.
buildingMinimumHeightVerticalTitleINPUT(Optional) Display the vertical title when the height of buildings reaches this value. Default value is 10.
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.

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.24

3 years ago

1.0.23

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.19

3 years ago

1.0.20

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.10

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago