marmelab/EventDrops

finalConfiguration and configurable

malishahi opened this issue · 4 comments

In the latest version, it has been explained that using configurable, you can set/get all configs, but it does not work.
eventDropGraph = configurable(eventDropGraph, finalConfiguration);

Am I right on this bug?

I had to manually sent configs as the following

       const createChart = eventDrops({
            start: new Date(new Date().getTime() - (3600000 * 24 * 365)),
            end: new Date(),
            eventLineColor: (d, i) => colors[i],
            date: d => new Date(d.date),
            mouseover: showTooltip,
            mouseout: hideTooltip,
            zoomend: this.renderStats,
            //.hasBottomAxis(true)
            margin: {
                top: 10,
                left: 0,
                bottom: 80,
                right: 180
            }
        });

I guess you speak about the rewrite branch. Indeed, we removed configurable in profit of a plain configuration object such as above. However, we also change a little bit the configuration. You can get more informations in the Migration Guide.

Perfect. It seems i was using another branch. Shall I start to use this branch?

You can, yet we are very close to the 4.0 release (normally this week).

We just released the 1.0 version last week. You can now use it to get better performances. For more information, feel free to read our blog post about this new release. :)