Skip to content

Commit

Permalink
Better countries
Browse files Browse the repository at this point in the history
  • Loading branch information
srugano committed Jan 28, 2025
1 parent 445dd41 commit d7beace
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,23 @@ <h3 class="text-sm font-semibold">
.brushOn(false)
.elasticY(true)
.renderHorizontalGridLines(true)
.xAxisLabel("Countries")
.yAxisLabel("{% translate 'Amount Paid (USD)' %}")
.barPadding(0.01)
.margins({ top: 20, right: 20, bottom: 50, left: 80 })
.outerPadding(0.05)
.ordering((d) => -d.value)
.margins({ top: 20, right: 25, bottom: 85, left: 80 })
.outerPadding(0.1)
.ordering((d) => -d.key)
.title((d) => `${d.key}: ${d.value.toFixed(2)} USD`)
.colors(d3.scaleOrdinal().range(d3.schemePaired))
.colorAccessor((d) => d.key)
.render();
countryChart.yAxis().ticks(5);
countryChart.yAxis().ticks(4);
countryChart.on('renderlet', function(chart) {
chart.selectAll('g.x text')
.attr("transform", "rotate(28)")
.style("text-anchor", "start")
.attr("dx", "2");

});

function updateTopMetrics() {
const totalPaymentsCount = ndx.groupAll().reduceSum(d => d.payments || 0).value();
Expand Down

0 comments on commit d7beace

Please sign in to comment.