-
Notifications
You must be signed in to change notification settings - Fork 2
Difference Chart
Josh Wasserman edited this page Aug 28, 2018
·
3 revisions
<template>
<div>
</div>
</template>
<script>
import {D3DifferenceChart} from 'jscatalyst'
export default{
data(){
return{
differenceChartData = []
}
},
components:{
differenceChart: D3DifferenceChart
}
}
</script>Type: Array
The dataModel for the D3DifferenceChart takes the form of an array of objects and is empty by default.
differenceChartData = [
{ date: "2017-01-01", expected: 100, actual: 50 },
{ date: "2017-01-05", expected: 30, actual: 50 },
{ date: "2017-01-10", expected: 45, actual: 90 },
{ date: "2017-01-15", expected: 110, actual: 150 },
{ date: "2017-01-20", expected: 90, actual: 130 },
{ date: "2017-01-25", expected: 80, actual: 50 },
{ date: "2017-01-30", expected: 150, actual: 60 },
{ date: "2017-02-04", expected: 100, actual: 30 }
];-
date
Type: String
Takes a date written as a string in the form
"YYYY-MM-DD"by default. This format can be changed using the thedateFormatproperty. -
expected
Type: Number
Represents the expected value of this data point.
-
actual
Type: Number
Represent th actual value of this data point.
Type: String
The label of the Y-Axis.
Type: String
String representing the expected format of the date key in the dataModel. Default YYYY-MM-DD
Type: Array
The keys property takes an array of strings. Its indicated function is to allow the developer the ability to overwrite the "actual" and "expected" keys in the dataModel. However this appears to be broken.