pepstock-org / Charba

J2CL and GWT Charts library based on CHART.JS
https://pepstock-org.github.io/Charba-Wiki/docs
Apache License 2.0
62 stars 6 forks source link

Adding support for "hidden" dataset #14

Closed niekvanderkooy closed 5 years ago

niekvanderkooy commented 5 years ago

As can be seen here: https://github.com/chartjs/Chart.js/issues/689 datasets have support for a "hidden" field, which means they are hidden from drawing, but available to be enabled. See also https://stackoverflow.com/questions/36846177/chart-js-how-to-set-a-line-chart-dataset-as-disabled-on-load

It would be great if we could have support for getHidden() and setHidden(bool hidden) methods on a dataset, so we can choose to have a dataset disabled by default, but that users can enable them if they so choose.

stockiNail commented 5 years ago

Sounds good. Agree! ASA it will be implemented, I'll reply here.

stockiNail commented 5 years ago

Implemented setHidden and isHidden at Dataset level.

FYI we are implementing on top of JSNI, also the JSINTEROP methods in order to be ready for GWT 3.

Added to JSINTEROP class as well.

As soon as the update will be commited, I'll publish JAR here.

Here is the result at first drawing:

canvasdshidden

niekvanderkooy commented 5 years ago

Hi! Is there a timeline for when the above addition will be released in a Maven release? Thanks!

stockiNail commented 5 years ago

apologies. We are working to introduce JSINTEROP to be ready for GWT 3. Nevertheless we are doing the last tests and we will release new version in a couple of days. FYI JSinterop part is not 100% tested even if available on code.

Fuzzo commented 5 years ago

Version 1.6 has been just released to Maven Central. A few hours may be needed to be available.

nseb commented 5 years ago

apologies. We are working to introduce JSINTEROP to be ready for GWT 3. Nevertheless we are doing the last tests and we will release new version in a couple of days. FYI JSinterop part is not 100% tested even if available on code.

Hi @stockiNail , Sorry , can you explain news in 1.6 except GWT3 support

Fuzzo commented 5 years ago

Charba versions 1.x does NOT contains GWT3/JsInterop full support. That version will be 2.x (when ready and tested). I let @stockiNail to explain the v1.6 updates in detail.

stockiNail commented 5 years ago

@nseb some news:

  1. controllers implementation
  2. complete mapping of CHART options in order to modify it at runtime (for instance into a plugin) without redrawing the chart
  3. bugfix (some attributes were wrong on time series)
  4. added setHidden to dataset

JSInterop has been removed to avoid that anyone will use it without a proper testing from our side. It will be in version 2. Be aware that JSInterop is available in GWT 2.8.x as well.

When we will publish new version also here (in release link) I'm gonna describe everything.

niekvanderkooy commented 5 years ago

setHidden seems to be working in 1.6, so I'm going to close this issue! @stockiNail, thanks for your quick action.

stockiNail commented 5 years ago

@nseb about you question related to new version (Charba 2 for GWT 3), here a short list of features:

We are still testing and document new version. We are still evaluating if to include some JS plugins out of the box (for instance datalabels or piecelabels, last version).

nseb commented 5 years ago

@stockiNail very good , I am looking forward to testing

stockiNail commented 5 years ago

@nseb we are completing last tests and completing a couple of implementation (even if we'd like to postpone to version 2.1). In next days it will be published. Wait for a while. I've already updated the WIKI (for version 2.0) even if the master is still 1.7... I know that's not the best but I needed to check how it looks like. You can start seeing what's new, if you like.

Be aware that going to JSINTEROP, the -generateJsInteropExport parameter must be added to GWT compiler because we have some exported objects.

stockiNail commented 5 years ago

@nseb Version 2.0 has been released. Next week jars will published into MVN