marmelab / EventDrops

A time based / event series interactive visualization using d3.js
http://marmelab.com/EventDrops/
MIT License
1.24k stars 237 forks source link

finalConfiguration and configurable #201

Closed malishahi closed 6 years ago

malishahi commented 6 years ago

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
            }
        });
jpetitcolas commented 6 years ago

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.

malishahi commented 6 years ago

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

jpetitcolas commented 6 years ago

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

jpetitcolas commented 6 years ago

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. :)