Compare commits
No commits in common. "e16e04c1144f46049f9d4d8a74186f94173dfad6" and "c69d7843abaf9d38c612e13bbb59926e1d7e87c7" have entirely different histories.
e16e04c114
...
c69d7843ab
@ -1,6 +1,5 @@
|
|||||||
# v0.9.7
|
# v0.9.7
|
||||||
- Fix margin on bottom of page
|
- Fix margin on bottom of page
|
||||||
- Use bar graph instead of line graph
|
|
||||||
|
|
||||||
# v0.9.6
|
# v0.9.6
|
||||||
- Make ammo packs in containers directly navigable in table view
|
- Make ammo packs in containers directly navigable in table view
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import Chart from 'chart.js/auto'
|
import { Chart, Title, Tooltip, Legend, LineController, LineElement, PointElement, TimeScale, LinearScale } from 'chart.js'
|
||||||
import 'chartjs-adapter-date-fns'
|
import 'chartjs-adapter-date-fns'
|
||||||
|
Chart.register(Title, Tooltip, Legend, LineController, LineElement, PointElement, TimeScale, LinearScale)
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
initalizeChart (el) {
|
initalizeChart (el) {
|
||||||
const data = JSON.parse(el.dataset.chartData)
|
const data = JSON.parse(el.dataset.chartData)
|
||||||
|
|
||||||
this.el.chart = new Chart(el, {
|
this.el.chart = new Chart(el, {
|
||||||
type: 'bar',
|
type: 'line',
|
||||||
data: {
|
data: {
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: el.dataset.label,
|
label: el.dataset.label,
|
||||||
@ -50,8 +51,7 @@ export default {
|
|||||||
stacked: true,
|
stacked: true,
|
||||||
grace: '15%',
|
grace: '15%',
|
||||||
ticks: {
|
ticks: {
|
||||||
padding: 15,
|
padding: 15
|
||||||
precision: 0
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
x: {
|
x: {
|
||||||
|
@ -4,7 +4,8 @@ defmodule CanneryWeb.ErrorHelpers do
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
use PhoenixHTMLHelpers
|
use PhoenixHTMLHelpers
|
||||||
import Phoenix.{Component, HTML.Form}
|
import Phoenix.HTML.Form
|
||||||
|
import Phoenix.Component
|
||||||
alias Ecto.Changeset
|
alias Ecto.Changeset
|
||||||
alias Phoenix.{HTML.Form, LiveView.Rendered}
|
alias Phoenix.{HTML.Form, LiveView.Rendered}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user