Forum Replies Created

  • Joris

    Member
    17 décembre 2024 at 21h49 en réponse à: HTML Text – SVG n’apparait plus dans une App Canvas

    Merci pour vos retours !

    J’ai essayé de restaurer une ancienne version fonctionnelle de mon application, mais malheureusement cela n’a pas résolu le problème.

    Finalement, j’ai trouvé une solution en insérant mon SVG dynamique dans une image, au lieu d’utiliser un composant HTML. Cela m’a demandé quelques ajustements au niveau du code. Voici la version modifiée :

    <pre class=”language-markup”>"data:image/svg+xml;utf8, "&EncodeUrl("
    <svg xmlns='http://www.w3.org/2000/svg'>
    width='"&Container_SdToIdentify_13.Width&"' height='"&Round(Image9.Height;0)&" '>

    <!-- Fond de l'élement HTML -->
    <rect x='0' y='0' width='"& Container_SdToIdentify_13.Width &"' height='"&Round(Image9.Height;0)&"' rx='4' ry='4' fill='#D9D9D9' />

    <!-- Bar graph objectif -->
    <rect x='0' y='0' width='"& Round((Value(Label9_69.Text) * Round(Container_SdToIdentify_13.Width;0))/Round(Value(Last(Filter(type_product;ID=Last(Filter(type_product;ID=Last(Filter(OEE_Shift_Settings;punit_ID=Last(Current_punit).ID)).TypeProduct_ID)).ID)).theoreticalRate)*(Current_DurationShift/60);0);0) &"' height='"&Round(Image9.Height;0)&"' rx='4' ry='4' fill='#F84040'/>

    <!-- Bar graph quantité -->
    <rect x='0' y='0' width='"& Round((Last(Filter(Shift_TempCounterOK;Period="Team")).TotalValue * Round(Container_SdToIdentify_13.Width;0))/Round(Value(Last(Filter(type_product;ID=Last(Filter(type_product;ID=Last(Filter(OEE_Shift_Settings;punit_ID=Last(Current_punit).ID)).TypeProduct_ID)).ID)).theoreticalRate)*(Current_DurationShift/60);0);0) &"' height='"&Round(Image9.Height;0)&"' rx='4' ry='4' fill='#52CF7F'/>

    <line x1='"& Round((Value(Label9_69.Text) * Round(Container_SdToIdentify_13.Width;0))/Round(Value(Last(Filter(type_product;ID=Last(Filter(type_product;ID=Last(Filter(OEE_Shift_Settings;punit_ID=Last(Current_punit).ID)).TypeProduct_ID)).ID)).theoreticalRate)*(Current_DurationShift/60);0);0) &"'
    y1='0'
    x2='"& Round((Value(Label9_69.Text) * Round(Container_SdToIdentify_13.Width;0))/Round(Value(Last(Filter(type_product;ID=Last(Filter(type_product;ID=Last(Filter(OEE_Shift_Settings;punit_ID=Last(Current_punit).ID)).TypeProduct_ID)).ID)).theoreticalRate)*(Current_DurationShift/60);0);0) &"'
    y2='"& Round(Image9.Height;0) &"'
    stroke='white'
    stroke-width='2'
    stroke-dasharray='5,5'
    />

    </svg>")

    Donc je penche plus sur un problème MS