Skip to content

Commit

Permalink
feat(best-frontend): Fix ploty axis (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
diervo authored Feb 6, 2018
1 parent 013b196 commit 38d5092
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
function collectBenchmarkData(commitBenchmarks, commit, stat, collector = {}, name = '') {
if (commitBenchmarks.benchmarks) {
return commitBenchmarks.benchmarks.reduce((l, b) => {
return collectBenchmarkData(b, commit, stat, l, name + (commitBenchmarks.benchmarkName || ''));
const postName = commitBenchmarks.benchmarkName || commitBenchmarks.name || '';
return collectBenchmarkData(b, commit, stat, l, name ? `${name}:${postName}` : postName);
}, collector);
}

Expand Down
3 changes: 2 additions & 1 deletion packages/best-frontend/src/modules/one/page-project/plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ function buildPlottyLayout({ title }) {

function buildPlottyTrace({ commits, values, metric }, opts) {
return {
x: commits,
// Using a zero-width char (https://en.wikipedia.org/wiki/Zero-width_space) to force plotty to render labels
x: commits.map(c => '#\u200B' + c),
y: values,
mode: 'lines+markers',
name: metric,
Expand Down

0 comments on commit 38d5092

Please sign in to comment.