Jump to content

How to draw nice graph / charts


 Share

Recommended Posts

Hi all,

 

For my work, i need to produce automatically chart that i will include in my morning email.

 

First I tried the graph function of powershell with Microsoft Chart Controls , very nice looking, with help of this script : https://gallery.technet.microsoft.com/Drawing-charts-with-6ab5de4e#content

BUT is useless as i can't sort data in graph ( object array is ***** in powershell, order is random )

 

So trying back with autoit.

After lot of forum research :

 

  • RMChart : not working
  • Another script not working, or working but only in autoit GUI ( or can't find the good topic )
  • Chart.udf : nice but not in GDI so can't produce image
  • ImageMagick : possible but very hard to code the entire line

can't use excel, because can't install it on the production server.

 

 

In a perfect world i would produce this :

6.png

 

But simplest will be fine too :

1.png

 

 

Do you know an another solution, any help would be greatly appreciated.

Edited by pinkfoyd
Link to comment
Share on other sites

N.B. The Wiki is a great source for such functions. Please check the UDF page.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • 2 years later...
On 12/6/2016 at 6:28 PM, pinkfoyd said:

Hi, thanks for the reply, i found finally the solution myself, autoit and powershell...

 

example1.pngexample2.pngexample3.pngtest.png

create_chart.au3 11.83 kB · 670 downloads

Example_conf_chart.ini 416 B · 345 downloads

Can you post the _create_graph function? It isnt in, also not within the GDI module linked. You changed it? coz graphUDF says graph_create, instead of create_graph.

Link to comment
Share on other sites

51 minutes ago, mikell said:

Notsure about an answer (pinkfoyd, Last visited : December 9, 2016)

Do you know how to get those bars easily? I have multiple "examples" of a line graph, or dot-graph. But i'd also like the bars and don't know how to approach

Link to comment
Share on other sites

22 hours ago, notsure said:

Can you post the _create_graph function?

I looked into it and the function is within the create_chart.au3 file.  It is based on PowerShell 1.0.  In order to use it you must install the right assembly (System.Windows.Forms.DataVisualization.Charting.Chart) and enable powershell script.

Link to comment
Share on other sites

4 hours ago, Nine said:

I looked into it and the function is within the create_chart.au3 file.  It is based on PowerShell 1.0.  In order to use it you must install the right assembly (System.Windows.Forms.DataVisualization.Charting.Chart) and enable powershell script.

I have seen that yes, but i get no error whatsoever, only "example.png not found", so for some reason it won't create it, eventho if i start it with admin rights.

Link to comment
Share on other sites

If you have Excel installed I suggest to have a look at the ExcelChart UDF (please check my signature).

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

13 minutes ago, notsure said:

I have seen that yes, but i get no error whatsoever, only "example.png not found", so for some reason it won't create it, eventho if i start it with admin rights.

It means that you don't have the assembly installed.  I suggest you take a look at @water wise advice...

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...