Commit f176515c authored by Dorian Goepp's avatar Dorian Goepp

Remove unnused method

parent bd4cd38c
......@@ -67,27 +67,6 @@ class LineChart extends Component {
}));
return [lower, upper];
}
/**
* Add default values for the abscissa axis, if there is none
* @param {Object(Array(Object))} data the data to be plotted
*/
pre_process(data) {
let new_data = {}
// Iterate over the plot names (keys in data)
Object.keys(data).forEach((name) => {
// Iterate over the data of the plot (entries in the Array)
new_data[name] = data[name].map((entry, i) => {
// `entry` is an object supposed to have two keys: `x` and `y`. If the latter is missing, we add one based
// on the index of `entry` in the array.
if (!('x' in entry)) {
entry.x = i;
}
return entry;
})
});
return new_data
}
render() {
// Use the margin convention practice
......@@ -98,7 +77,6 @@ class LineChart extends Component {
const viewbox = "0 0 " + (width + margin.left + margin.right) +" "+ (height + margin.top + margin.bottom);
const data = this.props.data;
// const data = this.pre_process(this.props.data);
// Allocate one colour per line to plot
const lineNames = Object.keys(data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment