# WebChart Bar Set Minimum

**URL:** <https://forum.xojo.com/t/webchart-bar-set-minimum/73417>\
**Category:** Web\
**Created:** [November 28, 2022, 3:20am UTC](https://forum.xojo.com/t/webchart-bar-set-minimum/73417 "2022-11-28T03:20:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [November 28, 2022, 6:17am UTC](https://forum.xojo.com/t/webchart-bar-set-minimum/73417/2 "2022-11-28T06:17:42Z")

</div>

In Options you need to add: scales, yAxes, ticks, beginAtZero = True, for that you need to add the Event OverrideOptions.

![image](https://forum.xojo.com/uploads/default/original/2X/3/3911a90627c01cda832c617c791ee32dd93f2965.png)

```auto
Var js As String = "{""yAxes"": [{""ticks"": {""beginAtZero"":true}}]}"
options.value("scales") = New JSONItem(js)

```

Edit: found a post with a ‘step by step’ jsonitem:

> [@Question about WebChart](https://forum.xojo.com/t/question-about-webchart/71842/4):
>
> In case someone needs this, following @DerkJ 's advice this is what I got working: Var json\_scales As New JSONItem Var json\_yAxes As New JSONItem Var json\_ticks As New JSONItem json\_ticks.value("ticks") = "ticks" Var json\_begin\_at\_zero As New JSONItem json\_begin\_at\_zero.Value("beginAtZero") = True json\_ticks.Value("ticks") = json\_begin\_at\_zero json\_yAxes.add(json\_ticks) json\_scales.value("yAxes") = json\_yAxes options.value("scales") = json\_scales

Edit2: you can also take a look at this WebSDK WebChart Chart.JS 3.x

> **[GitHub - undtec/ChartJS: WebSDK ChartJS demo](https://github.com/undtec/ChartJS)**
>
> WebSDK ChartJS demo. Contribute to undtec/ChartJS development by creating an account on GitHub.

Edit3: you can use ‘min’ instead of ‘beginAtZero’ and ‘0’ instead of ‘true’ (or any other value.

---

_[View the full topic](https://forum.xojo.com/t/webchart-bar-set-minimum/73417)._
