mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 14:32:18 +00:00
Graph has reactive state over several types; WIP seperating data UI from graph component
This commit is contained in:
@@ -31,14 +31,14 @@ export const FhcChart = {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
fhcType: { // TODO: ist das notwendig?
|
||||
type: String,
|
||||
default: 'hcnorm',
|
||||
required: true,
|
||||
validator(val) {
|
||||
return ['hcnorm', 'hcgroupedstacked', 'hcdrill'].includes(val)
|
||||
}
|
||||
},
|
||||
// fhcType: { // TODO: ist das notwendig?
|
||||
// type: String,
|
||||
// default: 'hcnorm',
|
||||
// required: true,
|
||||
// validator(val) {
|
||||
// return ['hcnorm', 'hcgroupedstacked', 'hcdrill'].includes(val)
|
||||
// }
|
||||
// },
|
||||
type: {
|
||||
type: String,
|
||||
default: 'line',
|
||||
@@ -79,8 +79,6 @@ export const FhcChart = {
|
||||
validator(val) {
|
||||
return Array.isArray(val.categories) // https://api.highcharts.com/highcharts/xAxis.categories
|
||||
&& val.categories.every(c => typeof c === 'string')
|
||||
&& Array.isArray(val.title)
|
||||
&& Array.isArray(val.labels)
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
@@ -107,7 +105,10 @@ export const FhcChart = {
|
||||
|
||||
},
|
||||
createNewChart() {
|
||||
|
||||
this.setupGraph()
|
||||
},
|
||||
createNewChartFromOptions(chartOptions) {
|
||||
this.setupGraph()
|
||||
},
|
||||
setupGraph() {
|
||||
const wrapperDiv = document.getElementById(this.id)
|
||||
|
||||
Reference in New Issue
Block a user