Custom Charts Beta - Feedback Thread

With a few of us now beta testing Custom Charts, I thought it might be useful to have a thread to share feedback & ask questions, as I’m sure many of us will have the come across similar problems.

I need to spend a little more time with it, but some of my initial thoughts:

  • Will the ability to create custom charts be extended beyond ‘Admin’ role? I would say that anyone with Analyst permission should be able to create them. (Ideally, it might be a separate permission we can grant, but certainly shouldn’t be an ‘admin’ role)

  • A lot of the visualisations from Vega-Lite allow you to apply additional parameters (for example, for a histogram, setting the number of bins). rather than hard-coding these values, and for these custom charts to truely be re-usable, we need to be able to create a new user-input field for these parameters, and then pass that value through to the definition. (I can create a new input field, but this forces the user to select a field from the dataset which isn’t what we want here)

  • Be good if we could apply our existing colour palette to the chart rather needing to hard-code this.

  • longer term, being able to store these definitions in our github repo alongside our AML models would be preferable

3 Likes

Hey David,
Just on your second point (and maybe third) - have a look at the option definition properties (here: Custom Chart properties | Holistics Docs). I managed to set up 2 color pickers for a gradient area graph, it should be pretty simple to set up a number input to choose the number of bins. Then you would just reference the option value in the Vega Lite encoding.
For reference, it looks like this in my code:
The options block:

  options {
    option color1 {
      label: 'Color 1'
      type: 'color-picker'
      default_value: 'darkgreen'
    }}

Then to reference it in the Vega Lite JSON encoding:

 "mark": {
    "type": "area",
    "tooltip": true,
    "line": {
      "color": @{options.color1.value} 
    },
3 Likes

Thanks @Ian_McLaren , I’d completely missed that - yes this absolutely solves that problem!

1 Like

I’ve finally got a chance to start tinkering with this but can’t seem to get past the demo instructions. This is following the doc but I can’t get any further. What am I missing?

OMG it’s the comments…ok disregard :man_facepalming:

4 Likes

Absolutely agree with this! Only having admin’s creating charts is a bit of a pain.

+1 to that

Overall my feedback is that once you get a hang of the code and plugging in custom variables it works really well. I have had issues with more complex charts (confidence intervals) but for the “simpler” charts overall it works really well.

It would be great to have auto complete enabled for a lot of the definition, especially for the items in the curly brackets.

With the options section of custom charts, I’m not clear on what options are available. The one doc page says you can define things like histogram buckets but on the other doc page doesn’t mention that (i’m assuming they’re not hardcoding buckets). For example right now my chart looks horrible and I’d like to enable user to define the upper/lower boundaries which I swear I’ve seen on a regular chart. Is there a way to enable that type of option for custom?

Hi @sm_mk, the options section of custom charts is where you define values to interpolate to the template.
Our document for custom chart options is outdated, we are updating it.

Meanwhile I will try to explain it here.


Currently custom charts option only support atomic values (string, boolean, number), and Holistics is supporting some pre-defined option type to render into the setting form.

The definition of an option looks like this:

As you can see, there are currently 6 option types: input, number-input, toggle, radio, select and color-picker. I will go through each of them

input option

This type of option renders a text input in the setting form, and will resolve whatever user put into that text input
image

It can be defined like this:
image

After defining this option, use can use @{{ options.input_option.value }}
in your chart template to refer to the input value. Please note that input_option is just a sample name, you can define whatever name you want.

number-input option

Similar to input option, but renders a number input and resolves a number value
image

Definition:
image

Reference in chart template: @{{ options.input_number_option.value }} (option name can be changed)

toggle option

This option type renders a toggle element, and resolves a boolean value (true/false)
image

Definition:
image

Reference: @{{ options.toggle_option.value }} (option name can be changed)

radio option

This option type renders a radio list, and resolves the selected value
image

Definition:
image
(the options property is needed to define the list of available options)

Reference: @{{ options.radio_option.value }} (option name can be changed)

select option

Similar to radio option, but renders a select box instead
image

Definition:

Reference: @{{ options.select_option.value }} (option name can be changed)

color picker option

This option type renders a color picker, and resolves the selected color hex code

Definition:
image

Reference: @{{ options.color.value }} (option name can be changed)

Notices:

  • If you define many options, their name must be unique
  • You can define label for option to let setting form render the label, instead of the raw option name
  • Each option must have default_value defined. Currently you will have to take care of default value type for each option type. For example, toggle needs a boolean value, number-input needs a number value, etc,. In the future, we will improve the editor to add auto suggestion, better validation as @DataGeekDude suggested above.

Coming back to your case, if you want to define the upper/lower boundaries of your chart, I think you can create two number-input options, assuming that you name them upper_bound and lower_bound. Then, in your chart template, use @{{ options.upper_bound.value }}
and @{{ options.lower_bound.value }} in proper places to set chart’s upper and lower boundaries.

Hope this information helps!

4 Likes

Perfect! I appreciate you taking the time to post these details, can’t wait to try it out on what I was working on.

2 Likes

Hi, when I discovered vega lite, I thought it was a great grammar that could be used to design a tableau-like UI for designing charts for end users.
Like a more user friendly version of this : Pole✭

I understand that with the custom charts feature you took a different path but is it something that could come in the near future ?

Thanks for the suggestion. Why would you prefer the tableau-like UI instead of the current visualization settings?

Hi @anthonytd,

For me, this kind of UI is a bit like a “nocode” experience of building custom charts which enables end users to be more autonomous.
The custom charts feature delivered today is more targeted to developers / data teams in my understanding.

Best regards,
Damien