Skip to content

Commit

Permalink
Added cubic interpolation and gradients back
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmit Goswami authored and Harmit Goswami committed May 16, 2024
1 parent e940f2d commit 5309640
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions pontoon/insights/static/js/insights_charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ var Pontoon = (function (my) {

// Set up default Chart.js configuration
Chart.defaults.color = style.getPropertyValue('--light-grey-7');
Chart.defaults.borderColor = style.getPropertyValue('--dark-grey-1');
Chart.defaults.font.family = 'Open Sans';
Chart.defaults.font.weight = '100'; // Chart.js uses 'weight' instead of 'style' for font
Chart.defaults.plugins.legend.display = false;
Expand Down
16 changes: 12 additions & 4 deletions pontoon/insights/static/js/insights_tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,12 +447,14 @@ var Pontoon = (function (my) {
'--status-translated',
),
pointHitRadius: 10,
pointRadius: 4,
pointRadius: 3.25,
pointHoverRadius: 6,
pointHoverBackgroundColor: style.getPropertyValue(
'--status-translated',
),
pointHoverBorderColor: style.getPropertyValue('--white-1'),
fill: true,
tension: 0.4
},
humanData.length > 0 && {
type: 'bar',
Expand Down Expand Up @@ -631,12 +633,14 @@ var Pontoon = (function (my) {
'--status-unreviewed',
),
pointHitRadius: 10,
pointRadius: 4,
pointRadius: 3.25,
pointHoverRadius: 6,
pointHoverBackgroundColor: style.getPropertyValue(
'--status-unreviewed',
),
pointHoverBorderColor: style.getPropertyValue('--white-1'),
fill: true,
tension: 0.4
},
peerApprovedData.length > 0 && {
type: 'bar',
Expand Down Expand Up @@ -823,11 +827,13 @@ var Pontoon = (function (my) {
borderWidth: 2,
pointBackgroundColor: style.getPropertyValue('--lilac'),
pointHitRadius: 10,
pointRadius: 4,
pointRadius: 3.25,
pointHoverRadius: 6,
pointHoverBackgroundColor: style.getPropertyValue('--lilac'),
pointHoverBorderColor: style.getPropertyValue('--white-1'),
spanGaps: true,
fill: true,
tension: 0.4
},
{
type: 'line',
Expand All @@ -839,11 +845,13 @@ var Pontoon = (function (my) {
borderWidth: 2,
pointBackgroundColor: style.getPropertyValue('--purple'),
pointHitRadius: 10,
pointRadius: 4,
pointRadius: 3.25,
pointHoverRadius: 6,
pointHoverBackgroundColor: style.getPropertyValue('--purple'),
pointHoverBorderColor: style.getPropertyValue('--white-1'),
spanGaps: true,
fill: true,
tension: 0.4
},
approvedData.length > 0 && {
type: 'bar',
Expand Down

0 comments on commit 5309640

Please sign in to comment.