Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement code frequency graph #29191

Merged
merged 21 commits into from
Feb 23, 2024
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix linting errors
  • Loading branch information
sahinakkaya committed Feb 16, 2024
commit c426ecdf80876e129aaa8ef1e55870b3255e4593
14 changes: 6 additions & 8 deletions web_src/js/components/RepoCodeFrequency.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
fillEmptyStartDaysWithZeroes,
} from '../utils/time.js';
import 'chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm';
import $ from 'jquery';

const {pageData} = window.config;

Expand Down Expand Up @@ -106,8 +105,8 @@ export default {
pointRadius: 0,
pointHitRadius: 0,
fill: true,
label: "Additions",
backgroundColor: colors["additions"],
label: 'Additions',
backgroundColor: colors['additions'],
borderWidth: 0,
tension: 0.3,
},
Expand All @@ -116,16 +115,15 @@ export default {
pointRadius: 0,
pointHitRadius: 0,
fill: true,
label: "Deletions",
backgroundColor: colors["deletions"],
label: 'Deletions',
backgroundColor: colors['deletions'],
borderWidth: 0,
tension: 0.3,
},
],
};
},


getOptions() {
return {
responsive: true,
Expand Down Expand Up @@ -160,11 +158,11 @@ export default {
},
},
};
</script>
</script>
<template>
<div>
<div class="ui header gt-df gt-ac gt-sb">
{{ isLoading ? locale.loadingTitle : errorText ? locale.loadingTitleFailed: `Code frequency over the history of ${this.repoLink.slice(1)}` }}
{{ isLoading ? locale.loadingTitle : errorText ? locale.loadingTitleFailed: `Code frequency over the history of ${repoLink.slice(1)}` }}
</div>
<div class="gt-df ui segment main-graph">
<div v-if="isLoading || errorText !== ''" class="gt-tc gt-m-auto">
Expand Down