Better Access Charts
Better Access Charts
Better Access Charts
About me
• Thomas Möller (Graduated banker)
• 2000 - 2013 Access developer
• 2013 - 2017 Data Governance /
Data Quality Management
• 2017 - 2021 Project Manager DWH
• Since 04/2021 Head of Process-Team
• 2007 - 2016 MVP MS Access
• Spare-time activity: Team-Moeller.de
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 3
Contact
• Website www.Team-Moeller.de
• Blog Blog.Team-Moeller.de
• E-Mail Thomas@Team-Moeller.de
• Twitter https://twitter.com/ThomasMoeller
• GitHub https://github.com/team-moeller
• XING https://www.xing.com/profile/Thomas_Moeller40
• Linked In https://www.linkedin.com/in/TeamMoeller
• Facebook https://www.facebook.com/TeamMoeller
• MVP http://mvp.microsoft.com/de-de/mvp/Thomas%20Moeller-37548
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 4
Schedule
• Charts in Access
• External dependencies
• Chart.js basics
• Class modules
Classic Charts
Modern Charts
Alternative Solutions
CHARTS IN ACCESS
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 6
Classic Charts *
• Microsoft Graph Chart, since Office 97
• ActiveX control
• Integrated since Access 2010
• Look somewhat dated
• Non-intuitive
• Steep learning curve
Modern Charts *
+ Modern design, easy to use
+ No external dependencies
+ Usable in Continuous forms
Alternative solutions
• Export to Excel
• Reporting with Excel
Survey
• I use Classic Charts …
regularly, rarely, never
Initial situation
First thoughts
The first try
Webbrowser control
Schematic structure
Initial situation
Home
Office Autumn
Corona
Getting
It‘s dark
raining
Need
Monotony I can not
distraction
get out
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 12
First thoughts
• Charts with Javascript
• Think, I have seen
something like this before
• Research on the
Internet
• Can‘t find
anything suitable
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 13
• Database
Demo
• Form with webbrowser control
• Code to load the file
• Works as expected
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 14
Schematic structure
Access database File system
Form
Webbrowser control
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 16
Existing dependencies
Chart.js: File vs. CDN
Digression: CDN
Feature Browser Emulation
Solution „without“ dependencies
EXTERNAL DEPENDENCIES
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 17
Existing dependencies
Access database File system
Form
Webbrowser control
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 18
Chart.js
• Local file
• In the application directory
• Or in a central directory
• Where is the file from?
• Save file to a table …
• … and export if necessary
• CDN
• Internet connection required
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 19
• Goals:
• Resiliency
• Fast delivery
• Example: Cloudflare
• Chart.js, for example, is also hosted here
• In more than 250 data centers spread all over the world
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 20
• Better alternative
• Directive in HTML Code
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 21
“Without“ dependencies
Access database File system
Form
Webbrowser control
CDN
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 22
Licence
Basic structure of the *.html file
Chart types, data and labels
Colors, title, legend
Axes and plugins
CHART.JS BASICS
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 23
Licence
• Published under “MIT Licence“:
References to scripts
HTML 5 canvas
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 25
Create chart
Definition Chart
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 26
Chart types
• A total of 9 chart types: https://www.chartjs.org/docs/2.9.4/charts/
Colors
• Definition within datasets possible
• https://www.chartjs.org/docs/2.9.4/general/colors.html
• Alternative: Plug-In
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 29
Chart title
• Definition of the title and its properties
• https://www.chartjs.org/docs/2.9.4/configuration/title.html
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 30
Legend
• Definition of the legend and its properties
• https://www.chartjs.org/docs/2.9.4/configuration/legend.html
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 31
Axes
• Definition of the axes and their properties
• https://www.chartjs.org/docs/2.9.4/axes/
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 32
Plugins
• Definition of plugins and their properties
• https://www.chartjs.org/docs/2.9.4/developers/plugins.html
Basic ideas
Schematic structure
Installation in your application
Data binding, properties
Documentation
CLASS MODULES
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 34
Basic ideas
• Easy integration in your own application
• No prior knowledge of HTML/Javascript required
• No detailed knowledge of Chart.js necessary
• Simple data binding
Schematic structure
Access database File system
Table Module
Form
Webbrowser control
CDN
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 36
Properties overview
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 40
Published on GitHub
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 41
Contributions?
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 44
To be continued …
• Hierarchy of classes
• Additional properties
Links
Links
Links
RESOURCES
Thomas Möller Better Access Charts - the real "Modern Charts" for Access 46
Links
• GitHub Project: Better Access Charts
• https://github.com/team-moeller/better-access-charts
Links
• Chart.js Homepage
• https://www.chartjs.org/
• Chart.js Documentation
• https://www.chartjs.org/docs/latest/
• Chart.js Samples
• https://www.chartjs.org/docs/latest/samples
Links
• WebBrowserControl object (Access)
• https://docs.microsoft.com/en-us/office/vba/api/access.webbrowsercontrol