Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread Highcharts Example Application
Mon, Jul 9 2018 12:32 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Here's an example application that shows how to create and update a chart.  It does *not* implement the entire Highcharts API, but you can find the rest of the API here:

https://api.highcharts.com/class-reference/Highcharts.Chart

The CreateObject function is not documented in EWB, but is typically used for interop with JS code (Google Maps, etc.).  I will get it documented for the next build, but for now there is one caveat regarding its usage:

You must store the result of the CreateObject into a temporary variable.  Currently, the compiler does some less-than-ideal typing of this function, so if you try to use it directly as a parameter in another function call, the compiler will *not* be able to resolve the outer function call.  I will be fixing this for the next build.

If you have any questions, feel free to post them as replies.

Tim Young
Elevate Software
www.elevatesoft.com



Attachments: highcharts_example.zip
Mon, Jul 9 2018 2:46 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Okay, more information on the type-checking of external object instances:

I forgot that the external object instances are treated differently than the base TObject class (WebCore unit) by the compiler.  They actually descend from the "Object" class, not the "TObject" class, and the compiler handles them as two distinct type trees in order to avoid mixing EWB class instances with external JS class instances.

I updated the project (attached) so that the external createChart chartData TObject parameter declaration is correctly changed to Object instead.

I also removed the .wbc project configuration file, which had some of my personal settings in there.

Tim Young
Elevate Software
www.elevatesoft.com



Attachments: highcharts_example.zip
Tue, Jul 10 2018 3:54 AMPermanent Link

Matthew Jones

Tim Young [Elevate Software] wrote:

> Here's an example application that shows how to create and update a chart.  It does not implement the entire Highcharts API, but you can find the rest of the API here:

Tim, AVG popped up and said that "createchart.js is infected with JS:LockyDownloader[Trj]". Probably a false alert, but could you check and confirm the zip is good please? Thanks.


--

Matthew Jones
Tue, Jul 10 2018 6:55 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< I also removed the .wbc project configuration file, which had some of my personal settings in there. >>

Duh, I forgot that the .wbc contains the external file declarations, so it's necessary.  Fixed .zip attached.

Tim Young
Elevate Software
www.elevatesoft.com



Attachments: highcharts_example.zip
Tue, Jul 10 2018 7:09 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< Tim, AVG popped up and said that "createchart.js is infected with JS:LockyDownloader[Trj]". Probably a false alert, but could you check and confirm the zip is good please? Thanks. >>

AV software just cracks me up.  This is the entirety of that JS file:

function createChart(elementName,chartData)
{
  return Highcharts.chart(elementName,chartData);
}

Unless I'm mistaken, it's pretty hard to hide malware in those 4 lines of text. Wink

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Jul 11 2018 4:07 AMPermanent Link

Matthew Jones

Tim Young [Elevate Software] wrote:
> AV software just cracks me up.  This is the entirety of that JS file:
> ..
> Unless I'm mistaken, it's pretty hard to hide malware in those 4 lines of text. Wink

Thanks for the confirmation. My AVG subscription is up soon, and won't be renewed...

--

Matthew Jones
Fri, Jul 13 2018 12:04 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< Thanks for the confirmation. My AVG subscription is up soon, and won't be renewed... >>

Windows Defender works pretty well now, as far as I've been able to tell.  Unfortunately, a lot of the others have degraded into a mess with whitelisting executables and stuff like this.

Tim Young
Elevate Software
www.elevatesoft.com
Image