-extern struct som_table_class tab_table_class;
-
-void
-chart_init (struct chart *chart, const struct chart_class *class)
-{
- chart->class = class;
- chart->ref_cnt = 1;
-}
-
-void
-chart_geometry_init (plPlotter *lp, struct chart_geometry *geom)
-{
- /* Start output page. */
- pl_openpl_r (lp);
-
- /* Set coordinate system. */
- pl_fspace_r (lp, 0.0, 0.0, 1000.0, 1000.0);
-
- /* Set line thickness. */
- pl_flinewidth_r (lp, 0.25);
- pl_pencolor_r (lp, 0, 0, 0);
-
- /* Erase graphics display. */
- pl_erase_r (lp);
-
- pl_filltype_r (lp, 0);
- pl_savestate_r(lp);
-
- /* Set default chartetry. */
- geom->data_top = 900;
- geom->data_right = 800;
- geom->data_bottom = 120;
- geom->data_left = 150;
- geom->abscissa_top = 70;
- geom->ordinate_right = 120;
- geom->title_bottom = 920;
- geom->legend_left = 810;
- geom->legend_right = 1000;
- geom->font_size = 0;
-
- geom->fill_colour.red = 255;
- geom->fill_colour.green = 0;
- geom->fill_colour.blue = 0;
-
- /* Get default font size */
- if (!geom->font_size)
- geom->font_size = pl_fontsize_r (lp, -1);
-
- /* Draw the data area */
- pl_box_r (lp,
- geom->data_left, geom->data_bottom,
- geom->data_right, geom->data_top);
-}
-
-void
-chart_geometry_free (plPlotter *lp)
-{
- if (pl_closepl_r (lp) < 0)
- fprintf (stderr, "Couldn't close Plotter\n");
-}
-
-void
-chart_draw (const struct chart *chart, plPlotter *lp)
-{
- chart->class->draw (chart, lp);
-}
-