Remove the border from the chart axes. Add price ticks to the chart

pull/346/head
Ryan Arthur 6 years ago committed by jimmay5469
parent d3e23b4196
commit 9f146fe572
  1. 16
      apps/explorer_web/assets/js/lib/market_history_chart.js

@ -54,7 +54,8 @@ function createMarketHistoryChart (ctx) {
scales: { scales: {
xAxes: [{ xAxes: [{
gridLines: { gridLines: {
display: false display: false,
drawBorder: false
}, },
type: 'time', type: 'time',
time: { time: {
@ -62,23 +63,28 @@ function createMarketHistoryChart (ctx) {
displayFormats: { displayFormats: {
week: 'MMM D' week: 'MMM D'
} }
},
ticks: {
min: 4
} }
}], }],
yAxes: [{ yAxes: [{
id: 'price', id: 'price',
gridLines: { gridLines: {
display: false display: false,
drawBorder: false
}, },
ticks: { ticks: {
beginAtZero: true, beginAtZero: true,
callback: (value, index, values) => '', callback: (value, index, values) => formatPrice(value),
maxTicksLimit: 6 maxTicksLimit: 4
} }
}, { }, {
id: 'marketCap', id: 'marketCap',
position: 'right', position: 'right',
gridLines: { gridLines: {
display: false display: false,
drawBorder: false
}, },
ticks: { ticks: {
callback: (value, index, values) => '', callback: (value, index, values) => '',

Loading…
Cancel
Save