esnet / esnet/react-timeseries-charts

styling doesn't work when column name is changed in baselines example

Open
#352 1 comment 0 reactions 0 assignees View on GitHub
:spider: bug
Dominant language
JavaScript
Stars
876
Forks
279
PR merge metrics
No merged PRs in 30d

Description

Hi! I was going through the [baselines](https://github.com/esnet/react-timeseries-charts/blob/master/src/website/packages/charts/examples/baselines/Index.js) sample code to see how styling works. My understanding is that the key in the `style` object has to match the column name of your `TimeSeries`, i.e.:
```
const series = new TimeSeries({
name: "USD_vs_EURO",
columns: ["time", "value"], <-- this
points
});

const style = {
value: { <-- matches this
stroke: "#a02c2c",
opacity: 0.2
}
};
```
However, when I change both of these values to, let's say, "test" like so:
```
const series = new TimeSeries({
name: "USD_vs_EURO",
columns: ["time", "test"],
points
});

const style = {
test: {
stroke: "#a02c2c",
opacity: 0.2
}
};
```
the plot stops working.

screen shot 2018-12-27 at 11 23 36 am

Am I missing anything? Do I have to change `value` to `test` any other places? Thanks in advance!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.