[legendPosition]="below" is not working in charts which provide this property
See original GitHub issueI’m submitting a … (check one with “x”)
- bug report - search github for a similar issue or PR before submitting
- feature request
- support request - use StackOverflow (add the
ngx-charts
tag) or the gitter chat for support questions
Current behavior
After providing the [legendPosition]=“below”, it get this properties in my template however it doesn’t reflect on my UI. The legends still stay in the default position.
Expected behavior
As per the value provided to the [legendPosition] property, it should place the legends to the repective position with repect the graph.
Reproduction of the problem
- create a template with simple angular app
- add any chart which has [legendPosition] property supported
- add [legendPosition]=“below”
- run your application
What is the motivation / use case for changing the behavior?
- stock market graphs
- business KPI graphs
- Business Analytics Graphs
Please tell us about your environment:
- ngx-charts version: 8.0.2
- Angular version: 7.2.1
- Browser: [ Chrome XX ]
- Language: [all | TypeScript 2.7 | ES6/7 | ES5]
Screenshots of code with the proper output is attached below:
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Angular ngx-charts options for customizing the Legend?
The only options for legendPosition are 'right' (default) and 'below'. Rename Legend Fields. There don't seem to be options for customizing the ...
Read more >Legend | Chart.js
When using the 'chartArea' option the legend position is at the moment not configurable, it will always be on the left side of...
Read more >legend - Sets Legend Properties | CanvasJS Charts
Legend items/entries are stacked vertically (vertical orientation) when it displayed to the right or left of plotArea and horizontally (horizontal orientation) ...
Read more >Show or hide a chart legend or data table - Microsoft Support
Select a chart and then select the plus sign to the top right. Point to Legend and select the arrow next to it....
Read more >Configure Legend - FusionCharts
Legends are not applicable to single series charts. In the following image, the legend rendered below the x-axis helps identify the data plots...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In your component file , declare a variable as
below = LegendPosition.below
then in your template code,[legendPosition]="below"
Small correction: LegendPosition.Below it appears. In the example grouped horizontal bar chart, I have noticed that schemeType also does not accept a string. It seems to accept enum ScaleType now as well.