Skip to content

Commit

Permalink
Remove right-hand legends next to ApexCharts donut charts
Browse files Browse the repository at this point in the history
  • Loading branch information
pacphi committed Oct 22, 2024
1 parent bc8f143 commit 7222f0a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,15 @@ public SnapshotApplicationSummaryView(
private ApexCharts createDonutChart(Map<String, Long> items) {
ApexChartsBuilder chartBuilder = new ApexChartsBuilder();
chartBuilder.withChart(ChartBuilder.get().withType(Type.DONUT).build())
.withLegend(LegendBuilder.get()
.withPosition(Position.RIGHT)
.withLegend(LegendBuilder.get().withShow(false).build())
.withResponsive(ResponsiveBuilder.get()
.withBreakpoint(480.0)
.withOptions(OptionsBuilder.get()
.withLegend(LegendBuilder.get()
.withShow(false)
.build())
.withResponsive(ResponsiveBuilder.get()
.withBreakpoint(480.0)
.withOptions(OptionsBuilder.get()
.withLegend(LegendBuilder.get()
.withPosition(Position.BOTTOM)
.build())
.build())
.build());
.build())
.build());
ApexCharts chart = chartBuilder.build();
updateChartData(chart, items);
chart.setHeight("120px");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,15 @@ public SpringApplicationReportDependencyFrequencyView(

ApexChartsBuilder chartBuilder = new ApexChartsBuilder();
chartBuilder.withChart(ChartBuilder.get().withType(Type.DONUT).build())
.withLegend(LegendBuilder.get()
.withPosition(Position.RIGHT)
.withLegend(LegendBuilder.get().withShow(false).build())
.withResponsive(ResponsiveBuilder.get()
.withBreakpoint(480.0)
.withOptions(OptionsBuilder.get()
.withLegend(LegendBuilder.get()
.withShow(false)
.build())
.withResponsive(ResponsiveBuilder.get()
.withBreakpoint(480.0)
.withOptions(OptionsBuilder.get()
.withLegend(LegendBuilder.get()
.withPosition(Position.BOTTOM)
.build())
.build())
.build());
.build())
.build());
chart = chartBuilder.build();
updateChartData(chart, items);
chart.setHeight("320px");
Expand Down

0 comments on commit 7222f0a

Please sign in to comment.