Atozed Forums

Full Version: Using IWChartJS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,

a new demo showing how to use the new IWChartJS component with IntraWeb. Super easy to create amazing charts. Check it out:

https://github.com/Atozed/IntraWeb/tree/...hi/ChartJS

[attachment=512]
Hi Alexandre,

Thank you very much for this demo, very helpful.
Just one question: How do I combine a Bar and and a Line in one chart?

Thanks in advance!

Cheers, Paul
Hi Paul,

I'm glad that you liked the demo.

This is a missing bit that it's ready but I couldn't test before releasing the latest update (15.2.64) so it hasn't been included, but we are going to release it in a few days.

To combine 2 different charts in one, you just need to create a second series with a different chart type.

If you check the third chart in that demo, I create 1 additional series (the main series is built-in).

For instance, to change the second series to a line, you can do this:

  // create a second series here
  SecondSeries := IWChartJS4.AddSeries(ctLine, 'Year 2050');

Then you will have the main series as a bar chart and the second series as a line one. Simple :-)
Hi Alexandre,

Thank you for your response. I tried creating a second series as a ctLine, and I can confirm that this doesn't work.
Whatever I try, the Chart keeps showing all series as the ChartType initially set on the TIWChartJS itself.

Cheers, Paul
(07-21-2022, 07:59 AM)PaulWeem Wrote: [ -> ]Hi Alexandre,

Thank you for your response. I tried creating a second series as a ctLine, and I can confirm that this doesn't work.
Whatever I try, the Chart keeps showing all series as the ChartType initially set on the TIWChartJS itself.

Cheers, Paul

Great that now Charts are implemented!

But I can confirm what Paul says.

In addition, the legend display does not work correctly for all ChartTypes: ctPie works correct, ctBar does not.

Another question: Is it possible to generate stack bars?

Cheers, Detlef
what do you mean the legend display do not work correctly for ctBar?

The example below is from the demo application. Seems to work correctly for me

[attachment=515]
Regarding stack bars, yes, it will be possible in the next release