Multilevel Gantt Chart 1s 8. Gantt Chart Series

Technological platform 1C:Enterprise 8.0 supports a number of special controls designed to display data in the form of charts different kind. These controls can be used in spreadsheet documents or directly in forms (for example, in a report form).

Controls designed to generate charts are interactive and support the decryption mechanism. By clicking on the desired chart indicator, the user can get detailed information or even generate a new report.

Diagram

Chart is a "universal" control that allows you to display statistical data in the form of charts of various types:

  • chart (regular, by steps, with areas, etc.);
  • histogram (regular, stacked, volumetric, etc.);
  • circular (normal and volumetric);
  • exchange (regular and "candle");
  • isometric (normal, continuous, etc.);
  • surface (frame, convex, concave surface, honeycomb, etc.);
  • radar (with areas, with accumulation, normalized, etc.);
  • measuring chart.

For each chart type, you can use a legend that explains the information displayed on the chart. The developer can (using the built-in language) change the appearance of the generated diagram or transpose it (change the placement of data along the axes of the diagram), while the diagram is redrawn by the system automatically:

Gantt Chart

The Gantt chart (also called "ribbon") contains a set of intervals located on the time axis and reflects the use of resources (series) by objects (points). This type of chart is widely used to visualize the progress of tasks, resource planning, working hours and other data that is not represented by specific numerical values, but by a set of time intervals:

In a typical Gantt chart, the individual tasks and activities of a project are listed on the left side of the chart, a timeline is displayed at the top, and the durations of each task and activity are shown as horizontal bars (ribbons) from start date to due date.


Flexible data presentation

The Gantt chart has a flexible data structure. Both points and series are hierarchical collections, which allows you, for example, to think of a project as a set of related, hierarchical tasks.

Multiple series allows you to display different data on the same chart, such as holidays, business trips, and sick leave.

It supports the ability to establish links between different chart intervals, so the end of one interval can be linked to the beginning of the next chart interval.

Visual settings and presentation

The Gantt chart is highly customizable appearance. Visual means can set fonts, colors, types of display of time intervals. For each value displayed on the chart, you can set an explanatory label.

Ease of use

The Gantt chart provides flexible programmatic and interactive scale settings. It is possible, regardless of the current size of the chart, to display a specified time interval (which may be automatically determined depending on the current data), or to display any specified interval in the visible area.

Supports the ability to interactively move and stretch chart intervals in 1C:Enterprise mode using the mouse:

At any point in time, you can dynamically add and remove timeline levels and control their presentation. For each level, you can specify the gradation of the scale, the format of the text representation of labels and the type of grid lines. On the timeline, you can use non-periodic marks to indicate, for example, some control points:

Pivot Chart

A pivot chart is similar in its capabilities to a pivot table, with the only exception that the data is displayed not as numerical values, but as a regular or volumetric histogram.

Like the PivotTable, the PivotChart makes it easy to analyze multidimensional data by controlling its placement in the chart both programmatically and interactively.

By dragging the desired fields to the chart area, you can freely arrange the dimensions in the series and points of the pivot chart that support a hierarchical structure:

The user can display several resources at once on the pivot chart:

Information about the objects displayed in the summary chart can be supplemented with values ​​from the attributes:

The developer requires minimal effort to create a summary chart, since data can be placed in it both using the built-in language and interactively (by the user), and the chart is redrawn when the composition of series and points changes, is performed by the system automatically.

Dendrogram

The dendrogram is specialized view diagrams, most often used to visualize results cluster analysis. In the general case, a dendrogram shows how similar some objects are to other objects, or to groups of objects. Compared objects are located on one axis of the dendrogram, and the other axis contains the values ​​of the distance between objects. The smaller the distance, the more objects are similar to each other:

Additional Information

You can get familiar with creating and using charts in real time. To do this, you can download the demo "Mini Trading System Development Example" which shows the process of developing a mini trading system using a chart to display data in the "Sales Analysis" report.

The Gantt chart was developed to visualize the time spans of a work schedule and is most commonly used in project management programs.

I assume that the Gantt Chart object in 1s was designed for ZUP (i.e. for the tasks of visualizing calculations), because. makes it possible for one Point (Employee) to see several Series (Accruals). It is not possible to define a series with multiple columns of detail, as is done in project management software.

So, the main elements of the chart are Point, Series, Value.

Gantt Chart Point

this is the main data cut, which can be identified with the employee, and is visually represented by a column to the left of the bar, while one point combines several rows represented by series of this point, i.e. sets top and bottom limits. The figure below for the point named "A" shows the boundaries of the displayed data.

Gantt Chart Series

this is an additional section that details the point, which can be identified with the calculation type, and visually represents a line inside the point limits.

Meaning of the Gantt Chart

this is an object that stores a collection of Intervals (Strips). In fact, visually, Value is the value of the series and, accordingly, occupies the entire area of ​​the series. The value can be obtained by specifying a Point and a Series.

Gantt chart interval

this is an object that sets the length of the bar. It has StartDate and EndDate parameters. An interval can be identified with one of the periods of the calculation type.

Now let's look at how this is implemented in code.

First you need to create a layout of the Spreadsheet document view on which to place the Gantt Chart

Create Named Areas to Accurately Get a Gantt Chart.

We also create an attribute with the Spreadsheet document type for displaying an image - TabDocResult.

Gantt chart receipt listing:

TabDocResult.Clear(); CurrentObject = FormAttributeToValue("Object"); Layout = CurrentObject.GetLayout("Layout"); RegionD=Layout.GetArea("ChartArea|ChartAreaTop"); Picture = AreaD.Pictures; DG = Drawing.Object;

Now we need to create a Point, Series, Value.

Listing of creating a Point, Series, values:

Point = DG.SetPoint(CurStr.Point); Series = DG.SetSeries(CurrentSeries); Value = DG.GetValue(Point, Series);

In the SetPoint and SetSeries methods, an arbitrary type is specified as a parameter.

When we have a Value then we can create intervals (stripes).

Interval creation listing:

Interval = Value.Add(); Spacing.Color = WebColors.GreenLawn; // for the interval, you can set the color Interval.Start = Date(2015,11,01); Interval.End = EndDay(Date(2015,11,05));

As a result, we got a Gantt Chart with minimal filling, it remains only to show it. To do this, you first need to add the completed chart to the Spreadsheet form document. But first, increase the size of the chart, otherwise it will be the same size as specified in the configurator layout. To do this, we use the "Position" method, it is applied to the pictures, but as you saw in the "Gantt Chart Receiving Listing" listing, the Chart is actually located on the picture object with index 0.

Chart Height = 15; Chart Width = 15; Figure.Position(RegionD.Region("R1C1:R"+ChartHeight+"C"+ChartWidth)); //width and height are expressed in rows and columns TabDocResult.Output(AreaD);

If you use managed forms, then all of the previous code must be written on the server.

You can download a small processing, on managed forms, in which you can see the principle of working with the Gantt Chart. Below are some screenshots of the processing.

Data entry area

Setting area

  • More convenient and faster work with tasks;
    • Visual graphic representation;
    • Changing the duration and start and end dates on the Gantt chart;
    • Working with a hierarchical list (shift right-left, collapse / expand a group)
    • Moving, deleting, clearing and adding rows (tasks)
    • Filling the selected area with the values ​​of the first selected line;
    • Dragging and copying rows
  • Additional display mode in the form of a calendar (scheduler) - for version 2.1 and for 1C:Enterprise 8.3.6 and higher:
    • Quick editing of tasks: change the duration by stretching, dragging to another day or by double-clicking through the task form.
    • Various display modes of the calendar (week, month) and tasks (display of communication and resources);
    • Convenient viewing of workload by performers;
    • Quick transfer of tasks between performers;
    • Ability to print the calendar.
  • Saving/opening a project to files information base(for BSP, UT 11.2, UNF, 1C:ERP);
  • Import/export of Microsoft Project documents in *.csv format.
  • Building a project based on arbitrary configuration tasks, as well as saving the project to an infobase (an example of a source code template for exchanging with configuration objects is present in processing);
  • Indication of resources and costs for tasks;
  • Recalculation of duration and dates, taking into account weekends, types of connections and delays.
  • Keeping the facts;
  • Report on costs by resources and periods (month, week);
  • Using filters by value in columns;
  • Column control: move, visibility control

Gant 1C: working with tasks in version 2.0 and higher

Gant 1C: working with tasks in the form of a calendar (scheduler) in version 2.1


Work features:

  • If you need to duplicate the value of columns from one task to lower ones (for example, task resources), you need to call the commandfrom the context menu.
  • In the additional calendar mode (version 2.1 for 1C:Enterprise 8.3.6 and above), you can create, move to another date, change the duration, transfer to another artist.

  • To change or view the data of the selected task, call the command"Task Description (F2)" from the context menu.

  • To assign resources to the selected task, call the command"Resource Assignment" from the context menu or double-click on a column cell"Resources".
  • To link tasks to each other for automatic calculation of dates, select them using the keyShift or ctrl and press the button "Link Tasks"- if the resources were previously specified, then the links will be created taking into account the resources, otherwise the tasks will be linked one by one. You can also set a connection in the form of a task on the tab:


  • Commands"Move Left (Ctrl + Alt + 9)" and "Move Right (Ctrl + Alt + 0)" you can manage the hierarchy of tasks.
  • To insert a new line between tasks, you need to call the command"Expand (Ctrl + Alt + I)" from the context menu.
  • To delete the selected rows or a row, you need to call the command"Delete line" from the context menu.
  • To clear the contents of the task name you need to call the command"Clear"from the context menu.
  • To apply a filter by value in columns, double-click on the column name.


  • To drag and drop tasks, you need to grab the border of the selected lines with the mouse and drag them under the desired line. To copy, perform similar actions with the key pressedctrlwhile dragging.
  • To drag and drop tasks on the Gantt Chart itself, do the following:
    1. Double-click the left mouse button on the Gantt chart itself (right side) - turn on the chart editing mode;
    2. Move the desired time intervals with the mouse or change their duration;
    3. Exit the chart editing mode by clicking on any other table cell. After that, the time of the remaining tasks will be calculated according to the links and shifted in the schedule automatically.

  • On the reports page, you can select one of the predefined options:

History of changes

Version 2.1.6.1 with calendar (10.04.2016)

Fixed: in version 2.1.5.1, processing did not start in a configuration without the "Library of standard subsystems";
- Fixed: when deleting rows under collapsed groupings, the links on the Gantt chart disappeared.
- Fixed: incorrect work starting from line 1000 (parallel display of the table and gantt chart, hierarchy).

Version 2.1.5.1 with calendar (20.02.2016)

Added the ability to save the project as infobase files with a standard subsystem (UT 11.2, UNF, 1C:ERP, ...).

The advantage of storing infobase files as compared to files on disk is that everything is stored in one database, the file is blocked while the user is working with it (so that other users cannot change the project at that time), the ability to save project versions, the ability to configure file access project by means of a standard subsystem.

Improved project autosave.

The parameters for connecting an external report to the infobase have been corrected.

Improved display of the Gantt chart with grouped rows after deleting and changing dates.

Also, the help for working with processing has been updated. Sections added:

+ "Saving/opening a project from infobase files with a standard subsystem (for UT 11.2, UNF, 1C:ERP, ...)".

+ "Connecting Gant 1C 2.1 to configuration".

* A lot of people asked (and some even demanded) a password for the Gant1C object module, and some also had concerns that there was some kind of malicious code (trojan). The chosen craftsmen, after all, managed to crack the object module ... Now I decided to open the cards for everyone - in version 2.1.5.1 about the object module is opened for viewing and editing - now you can see what was in the closed module.

Version 2.1.4.1 (with calendar) and 2.0.4.1 (12/20/2015):

Added the ability to connect to "Additional reports" in standard configurations (UT 11, 1C:ERP, ...).
P.S. Yes, in fact, this is processing, but since the layout of the data composition is used, I store it as an external report and in the configuration it needs to be connected in the "Additional reports".

Fixed a bug in the task form that occurred when manually entering the resource name in the task resource table.

Version 2.1.3.4 (with calendar) and 2.0.3.4 (10/30/2015):

Fixed link rebuilding errors when shifting left-right and deleting tasks (those who have version 2.1.2.2/2.0.3.2 can make changes by themselves by downloading the "Report on comparing version 2.1.3.4 with version 2.1.2.2.txt").


Version 2.1.2.2 (with calendar) and 2.0.3.2 (3.10.2015):

In the resource report, added the ability to group by task name (I once asked for Tsr1c a long time ago)

Fixed saving and autosaving of a re-opened file (found by milkers).

Fixed a bug that occurs when the number of tasks is more than 1000 (described by Diamond_Angel).

Version 2.1.1.9 (08/24/2015)

Added "Calendar" tab:

Displaying tasks in the form of a calendar (week, month) all and in a section labor resources(performers) - for a more convenient view of the workload of performers;

Editing the duration and location of tasks with the subsequent recalculation of dates in related tasks;

Quickly create and organize created tasks in the calendar by performers.

When displaying “By resources”, you can transfer a task from one resource (executor) to another;

Setting the display type of task text: show link, show resources. Also, the connection and resources are visible in the tooltip;

Ability to print the calendar.

Version 2.0.2.1 (2.08.2015)

Added the ability to load a list of resources from a file (for quickly specifying the same resources in different projects)

Version 2.0.1.16 (07/15/2015)

Completely redesigned for managed interface/Taxi.

After switching to UV / Taxi, processing began to work much more stable. During debugging, there was no crash when changing the scale of the Gantt chart and when changing the time intervals in the chart itself, which was noticed in the usual form.

The report on tasks is made on the basis of the data composition system

Updated and moved help to a separate file

Added the ability to specify a zero duration (for a milestone or as a note)

* Corrected calculation of dates and times

By default, the start date does not start from 00:00:00, but from the set start of working hours, and the end date lasts from the start of working hours + the number of working hours in a day (for example, from 9:00 - 17:00 - at 8 hourly working hours)

A tenth of the duration (0.1, 0.2, etc.) counts as 1 hour, which is much more practical. Previously, for example, with an 8-hour working time, the duration of 0.1 days meant as 0.1 * 8 = 0.8 hours = 48 minutes, which was confusing.

* Optimized and accelerated work with resources and connections.

Resources and links are placed in separate tables, not packed in cells spreadsheet document. It will also be convenient for exchanging information base data.

* The source code is completely open, except for one procedure in the object module

Fixed bugs when working with resources

The description of interaction with objects of arbitrary configuration, import / export to MS Project and the continuation of the description of processing are placed in a separate file for download.

P.S. The transition to a managed form was VERY difficult. I did not develop this development for a long time, because, in my opinion, without a managed interface, this would lead nowhere. It's like decorating a dried flower with beautiful packaging. Processing, on the technical side, is quite complicated - the source code contained many non-standard nuances that had to be encountered when translating to managed forms. To be honest, I thought that nothing would come of it, or the processing would be with an inferiority complex. But after many sleepless nights everything worked out! In addition, a new road to development has opened up, new ideas have appeared that I will definitely implement.