This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository echart.

View the commit online.

commit 14eefe631acfce902f466d6f2c0f69d7f2cebcd9
Author: Vincent Torri <[email protected]>
AuthorDate: Mon Jun 1 14:09:50 2026 +0200

    hbar: fix rendering
---
 src/lib/echart_bar.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/lib/echart_bar.c b/src/lib/echart_bar.c
index 227a7ed..6aeb0cf 100644
--- a/src/lib/echart_bar.c
+++ b/src/lib/echart_bar.c
@@ -189,9 +189,18 @@ _bar_smart_calculate(Evas_Object *obj)
 
    evas_object_geometry_get(obj, NULL, NULL, &w, &h);
 
-   gw = (w * sd->group_width) / (100.0 * sd->nbr_values);
-   sw = (w - sd->nbr_values * gw) / (sd->nbr_values - 1);
-   bw = (gw - sd->nbr_series + 1) / sd->nbr_series; /* bars separated by 1 px */
+   if (sd->is_horizontal)
+   {
+      gw = (h * sd->group_width) / (100.0 * sd->nbr_values);
+      sw = (h - sd->nbr_values * gw) / (sd->nbr_values - 1);
+      bw = (gw - sd->nbr_series + 1) / sd->nbr_series; /* bars separated by 1 px */
+   }
+   else
+   {
+      gw = (w * sd->group_width) / (100.0 * sd->nbr_values);
+      sw = (w - sd->nbr_values * gw) / (sd->nbr_values - 1);
+      bw = (gw - sd->nbr_series + 1) / sd->nbr_series; /* bars separated by 1 px */
+   }
 
    for (int j = 0; j < sd->nbr_series; j++)
    {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to