0

我使用 APEX 4.2 通过 AnyGantt 库创建了甘特图。当我为 Anygantt 图使用自定义 XML 时,一切正常。一旦我想使用自定义数据网格,折叠器就丢失了。

我的 XML 如下:

<anygantt>  <settings>
<navigation enabled="True" position="Top" size="30"> 
</navigation>
<editing allow_edit="true">
  <rounding>
    <date unit="Week" step="1" />
  </rounding>
</editing>
            <locale>
            <date_time_format week_starts_from_monday="True">
                <months>
                    <names>January,February,March,April,May,June,July,August,September,October,November,December</names>
                    <short_names>Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec</short_names>
                </months>
                <week_days>
                    <names>Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday</names>
                    <short_names>Sun,Mon,Tue,Wed,Thu,Fri,Sat</short_names>
                </week_days>
                <format>
                    <full>%yyyy.%MM.%dd.%HH.%mm.%ss</full>
                    <date>%yyyy.%MM.%dd</date>
                    <time>%HH.%mm.%ss</time>
                </format>
            </date_time_format>
        </locale>
</settings>
<datagrid enabled="true" width="300">
        <columns> 
            <column attribute_name="Name" width="200" cell_align="Left">
                <header>
                    <text>Name</text>
                </header>
                <format>{%Name}</format>
            </column>

            <column width="40" cell_align="Left">
                <header>
                    <text>Stunden</text>
                </header>
                <format>{%Stunden}</format>
            </column>
        </columns>
</datagrid>
<styles>
    <defaults>
      <period>
        <period_style>

        <bar_style>
        <labels>
          <label anchor="Center" valign="Center" halign="Center">
          <text>{%DISPO} %</text>
          <font face="Verdana" size="10" bold="true" color="White">
          </font>
          </label>
      </labels>
      </bar_style>

        </period_style>
  </period>
</defaults>

<period_styles>
  <period_style name="test">
      <bar_style>
        <labels>
          <label anchor="Center" valign="Center" halign="Center">
          <text>Center</text>
          <font face="Verdana" size="10" bold="true" color="White">
          </font>
          </label>
      </labels>
      <middle shape="Full">
          <fill enabled="true" type="Solid" color="DarkSeaGreen" />
          <border enabled="true" color="#FF0000" />
        </middle>
      </bar_style>
  </period_style>
</period_styles>
 </styles>  
 <resource_chart><resources><resource name="AVI" id="5"/>
<resource name="CAB" id="4"/>
<resource name="Test, Test (Test)" id="3-U837751" parent="3"/>
<resource name="PL" id="3"/>
<resource name="Struktur" id="2"/>
</resources><periods><period resource_id="3-U837751" name="NAME-3-U837751" start="2015.07.28 00:00" end="2015.07.31 00:00">
    <attributes>
    <attribute name="DISPO"><![CDATA[,5]]></attribute>
    </attributes>
    </period></periods></resource_chart>

4

1 回答 1

0

您需要将 cell_align="LeftLevelPadding" 添加到要查看折叠器的列中。就像是:

<column attribute_name="Name" width="200" cell_align="LeftLevelPadding">

这在 KB 中有描述:http: //support.anychart.com/customer/portal/articles/2077851--anygantt-4-x-collapser-is-missing-in-datagrid-column

您可以在 http://6.anychart.com/products/anygantt/docs/users-guide/index.html?columns.html找到有关列的更多信息

于 2015-07-30T00:12:16.850 回答