Tk::Chart - Extension of Canvas widget to create a graph like GDGraph.


use Tk::Chart::ModuleName;


Tk::Chart is a module to create and display graphs on a Tk widget. The module is written entirely in Perl/Tk.

You can set a background gradient color by using Tk::Canvas::GradientColor methods.

You can change the color, font of title, labels (x and y) of graphs. You can set an interactive legend. The axes can be automatically scaled or set by the code.

When the mouse cursor passes over a plotted lines, bars, pies or its entry in the legend, they will be turned to a color to help identify it.

You can use 3 methods to zoom (vertically, horizontally or both).

Tk::Chart::Areas, Extension of Canvas widget to create an area lines graph.

Tk::Chart::Bars, Extension of Canvas widget to create bars graph with vertical bars.

Tk::Chart::Boxplots, Extension of Canvas widget to create boxplots graph.

Tk::Chart::FAQ, Frequently Asked Questions about Tk::Chart.

Tk::Chart::Lines, Extension of Canvas widget to create lines graph. With this module it is possible to plot quantitative variables according to qualitative variables.

Tk::Chart::Mixed, Extension of Canvas widget to create a graph mixed with lines, lines points, splines, bars, points and areas.

Tk::Chart::Pie, Extension of Canvas widget to create a pie graph.

Tk::Chart::Points, Extension of Canvas widget to create point lines graph.

Tk::Chart::Splines, To create lines graph as Bézier curve.


In the demo directory, you have a lot of script examples with their screenshot. See also the web page of Tk::Chart.


See Tk::Chart::FAQ, Tk::Canvas::GradientColor, GD::Graph, Tk::Graph, Tk::LineGraph, Tk::PlotDataset, Chart::Plot::Canvas.


Djibril Ousmanou, <djibel at>


Please report any bugs or feature requests to bug-tk-chart at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

    perldoc Tk::Chart
    perldoc Tk::Chart::Areas
    perldoc Tk::Chart::Bars
    perldoc Tk::Chart::Boxplots
    perldoc Tk::Chart::FAQ
    perldoc Tk::Chart::Lines
    perldoc Tk::Chart::Mixed
    perldoc Tk::Chart::Pie
    perldoc Tk::Chart::Points
    perldoc Tk::Chart::Splines

You can also look for information at:



Copyright 2017 Djibril Ousmanou, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.