This is a migrated thread and some comments may be shown as answers.

Background Figure KENDOUI in Unigui + Delphi

4 Answers 1111 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sergio
Top achievements
Rank 1
Sergio asked on 17 Feb 2021, 09:43 PM

Please refer to this example of KENDO UI

https://demos.telerik.com/kendo-ui/line-charts/index

If I click  EXAMPLE I will see the chart with a background-image exactly like I need to do in a chart in my Unigui code

If I click VIEWSOURCE I will see the html code corresponding to the chart  including the part related to the background
<div id="chart" style="background: center no-repeat url('../content/shared/styles/world-map.png');"></div>

MY DOUBT is :
How can I insert a part of the  html code inside my Unigui + Delphi code ?

I think I did something like this in the past using "ClientEvents"
Can you help me on this ?

4 Answers, 1 is accepted

Sort by
0
Georgi Denchev
Telerik team
answered on 19 Feb 2021, 02:11 PM

Hi Sergio,

I would suggest asking for assistance on the Unigui forums as we do not offer support for Unigui + Delphi, so we would not be able to properly assist you in adding html to your application.

We can provide you with information regarding the available functionalities and options of the widgets, however the implementation itself is down to the customer.

Let me know if you have any questions.

Best Regards,
Georgi Denchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Sergio
Top achievements
Rank 1
answered on 19 Feb 2021, 07:22 PM

Thank you Georgi for the kind answer

I wrote before to Unigui forum but I ssaw this time and others before that KENDOUI can be used with Unigui but nobody is able to do it for slightly more complex things.

If you had given me a solution I would have bought a more complete version. But without sufficient support it is not worth it.

Thanks anyway

Sergio Feitoza  www.cognitor.com.br

0
Georgi Denchev
Telerik team
answered on 23 Feb 2021, 11:07 AM

Hello Sergio,

I can give you a few different ways to add a background image to the chart, the problem is I cannot guarantee it would work as we don't support Unigui + Delphi.

Generally speaking aside from applying it directly as a style to the div, you could either use css or execute javascript if the application allows it.

CSS class:

<style>
  .bg {
    background: center no-repeat url('../content/shared/styles/world-map.png');
  }
</style>

Using JavaScript:

document.getElementById("chart").style = "background: center no-repeat url('../content/shared/styles/world-map.png');";

Using JQuery:

$("#chart").css("background", "center no-repeat url('../content/shared/styles/world-map.png')");

I've also found this thread on the Unigui forum discussing javascript execution, you can see if it would be of any help.

Also make sure the chartArea.background configuration is set to an empty string otherwise the image won't appear.

Best Regards,
Georgi Denchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Sergio
Top achievements
Rank 1
answered on 23 Feb 2021, 12:33 PM

Hello George 

Thank you very much. This will help me. I will  do a test this week and inform here  Regards

Tags
General Discussions
Asked by
Sergio
Top achievements
Rank 1
Answers by
Georgi Denchev
Telerik team
Sergio
Top achievements
Rank 1
Share this question
or