1.1.0 • Published 1 year ago

horizontal-bar-chart v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Preview

Preview Horizontal Bar Chart

Installation

To install this package, run the following command in your terminal:

npm install horizontal-bar-chart

Usage

Import the HorizontalBarChartModule in your module:

import { HorizontalBarChartModule } from 'horizontal-bar-chart';
//...
@NgModule({
imports: [
    HorizontalBarChartModule,
    // ...
],
// ...
})
export class AppModule { }

Then, you can use the HorizontalBarChart component in your template:

<HorizontalBarChart
    [leftBarPercentage]="70"
    [rightBarPercentage]="30"
    [leftLegendColor]="'black'"
    [rightLegendColor]="'black'"
    [leftBarText]="'Left Bar'"
    [rightBarText]="'Right Bar'"
    [leftBarBackgroundColor]="'#f19f13'"
    [rightBarBackgroundColor]="'#eb3f43'"
    [marginTop]="50"
    [marginBottom]="50">
</HorizontalBarChart>

Inputs

leftBarPercentage (number): The percentage value of the left bar.
rightBarPercentage (number): The percentage value of the right bar.
leftBarText (string): The text to display on the left legend.
rightBarText (string): The text to display on the right legend.
leftBarBackgroundColor (string): The background color of the left bar.
rightBarBackgroundColor (string): The background color of the right bar.
marginTop (number): The margin top value of the chart container.
marginBottom (number): The margin bottom value of the chart container.
leftLegendColor (string) = The text color on the left legend;
rightLegendColor (string) = The text color on the right legend;

License

This package is under the MIT license.

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago