billboard.js icon indicating copy to clipboard operation
billboard.js copied to clipboard

Intent to remove .transform() API

Open netil opened this issue 5 years ago • 2 comments

Description

.transform() facilitate change generated chart type in a easy way.

Background

At the initialization, even though isn't necessary to be generated, some elements are generated.

Ex. if generate 'pie' type, axis elements are generated also.

The primary reason of this behavior comes from the possibility of the transforming type generated to different one. With this assumption, makes harder to optimize and complicating the process in general.

Also there's no practical real usecases on transforming types.

  • Chart is usually used to represent "some data" and it stays as is
  • Transforming looks "fancy", but there's no practical usage functionality
  • Getting rid of the possibility of type changes can reduce the complexity on implementing future changes(features)

Asking for help

This is very early though that I'm trying to implement. Before that, I want hear some feedback. Please, leave comments on this. Thanks in advance!

netil avatar Mar 08 '19 08:03 netil

I'm all for it that means reduced code complexity. Just regenerating the entire chart sounds like it would handle 99% of all use cases.

mivdnber avatar Apr 08 '19 13:04 mivdnber

Just released first RC version of v2.

For more details, checkout the changelog:

  • https://github.com/naver/billboard.js/blob/next/CHANGELOG-v2.md

netil avatar Jun 08 '20 09:06 netil