<HTML><BODY><div> </div><div>Hello,</div><div> </div><div>just <span style="color: rgb(44, 45, 46); font-family: Arial, Tahoma, Verdana, sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">wondering weather it is possible to have union (by connectiontype) layer of type chart? </span></div><div><span style="color: rgb(44, 45, 46); font-family: Arial, Tahoma, Verdana, sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Yesterday I have tried, but each time got an empty image.</span></div><div> </div><div><font color="#2c2d2e">Configuration looks like:</font></div><div> </div><div><div><div><font color="#2c2d2e">LAYER</font></div><div><font color="#2c2d2e">  NAME union_layer_name</font></div><div><font color="#2c2d2e">  TYPE         CHART</font></div><div><font color="#2c2d2e">  #PROCESSING "CHART_TYPE=pie"</font></div><div><font color="#2c2d2e">  #PROCESSING "CHART_SIZE_RANGE=c 30 100 2 2000000 5"</font></div><div><font color="#2c2d2e">  PROCESSING "ITEMS=province,c,n,y,ts,level_code"</font></div><div><font color="#2c2d2e">  STYLEITEM "AUTO"</font></div><div><font color="#2c2d2e">  STATUS DEFAULT</font></div><div><font color="#2c2d2e">  CONNECTIONTYPE UNION</font></div><div><font color="#2c2d2e">  CONNECTION "layer1,layer2 etc."</font></div><div><font color="#2c2d2e">  METADATA</font></div><div><font color="#2c2d2e">      ows_title         "name"</font></div><div><font color="#2c2d2e">      ows_include_items '*'</font></div><div><font color="#2c2d2e">      gml_include_items "all"</font></div><div><font color="#2c2d2e">      gml_geom_type "point"</font></div><div><font color="#2c2d2e">      ows_enable_request '*'</font></div><div><font color="#2c2d2e">      "wms_timeextent" "2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023"</font></div><div><font color="#2c2d2e">      "wms_timeitem" "ts"</font></div><div><font color="#2c2d2e">      "wms_timedefault" "2009"</font></div><div><font color="#2c2d2e">  END</font></div><div><font color="#2c2d2e">  </font></div><div><font color="#2c2d2e">  PROJECTION</font></div><div><font color="#2c2d2e">    "init=epsg:4326"</font></div><div><font color="#2c2d2e">  END</font></div><div><font color="#2c2d2e">  </font></div><div><font color="#2c2d2e">  VALIDATION</font></div><div><font color="#2c2d2e">    'time' '[0-9]{4}'</font></div><div><font color="#2c2d2e">    'default_time' '2009'</font></div><div><font color="#2c2d2e">  END</font></div><div><font color="#2c2d2e">  </font></div></div><div><div><font color="#2c2d2e">    CLASS </font></div><div><font color="#2c2d2e">    END</font></div></div><div><div><font color="#2c2d2e">  </font></div><div><font color="#2c2d2e">  END</font></div><div><font color="#2c2d2e">  </font></div><div><font color="#2c2d2e">LAYER </font></div><div><font color="#2c2d2e">    NAME  layer1</font></div><div><font color="#2c2d2e">    CONNECTIONTYPE POSTGIS</font></div><div><font color="#2c2d2e">    CONNECTION "host=x dbname=x user=x password=x"</font></div><div><font color="#2c2d2e">    DATA "geom_p from (...</font><span style="color: rgb(44, 45, 46); font-family: var(--vkui--octavius_font_family_global, var(--vkui--font_family_base, Helvetica, Arial, sans-serif)); letter-spacing: var(--vkui--font_text--letter_spacing--regular, normal);">)   foo using unique province using srid=4326"</span></div><div><font color="#2c2d2e">    </font></div><div><font color="#2c2d2e">    STATUS       ON</font></div><div><font color="#2c2d2e">    TYPE         CHART</font></div><div><font color="#2c2d2e">    PROCESSING "CHART_TYPE=pie"</font></div><div><font color="#2c2d2e">    PROCESSING "CHART_SIZE_RANGE=c 30 100 2 2000000 5"</font></div><div><font color="#2c2d2e">    STATUS ON</font></div><div><font color="#2c2d2e">    PROCESSING "LABEL_NO_CLIP=True"</font></div><div><font color="#2c2d2e">    </font></div><div><font color="#2c2d2e">    PROJECTION</font></div><div><font color="#2c2d2e">      "init=epsg:4326"</font></div><div><font color="#2c2d2e">    END</font></div><div><font color="#2c2d2e">    </font></div><div><font color="#2c2d2e">    VALIDATION</font></div><div><font color="#2c2d2e">    'time' '[0-9]{4}'</font></div><div><font color="#2c2d2e">    'default_time' '2009'</font></div><div><font color="#2c2d2e">    END</font></div><div><font color="#2c2d2e">    </font></div><div><font color="#2c2d2e">    METADATA</font></div><div><font color="#2c2d2e">      wms_title "layer 1"</font></div><div><font color="#2c2d2e">      gml_include_items "all"</font></div><div><font color="#2c2d2e">      gml_geom_type "point"</font></div><div><font color="#2c2d2e">      ows_include_items  "all"</font></div><div><font color="#2c2d2e">      ows_enable_request "*"</font></div><div><font color="#2c2d2e">      "wms_timeextent" "2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023"</font></div><div><font color="#2c2d2e">      "wms_timeitem" "ts"</font></div><div><font color="#2c2d2e">      "wms_timedefault" "2009"</font></div><div><font color="#2c2d2e">    END</font></div><div><font color="#2c2d2e">    </font></div><div><font color="#2c2d2e">    MAXSCALEDENOM 10000001</font></div><div><font color="#2c2d2e">    MINSCALEDENOM 1200001</font></div></div><div> </div><div><div><font color="#2c2d2e">    FILTER ([level_code]=1)</font></div><div><font color="#2c2d2e">    </font></div><div>etc...</div></div><div> </div><div>If I uncomment these lines in union layer:</div><div><div><font color="#2c2d2e">  #PROCESSING "CHART_TYPE=pie"</font></div><div><font color="#2c2d2e">  #PROCESSING "CHART_SIZE_RANGE=c 30 100 2 2000000 5"</font></div><div> </div><div><font color="#2c2d2e">This works but returns an empty image. And if these lines are not there , mapserver breaks with internal error.</font></div><div> </div><div><font color="#2c2d2e">I have looked briefly through documentation but nowhere was mentioned that union layer doesn’t support type chart, so maybe there is something missing in my mapfile.</font></div><div> </div><div><font color="#2c2d2e">Another thing is that may be there are other better option for me rather than using union layer. The thing is that I would like to draw map charts for different administrative units based on map scales, let’s say if I am in small map scale to draw chart for the country, if I zoom in — for district, and if I zoom further — for municipality. I have tried to keep it all in one layer of type chart and use this type of class definitions:</font></div><div><font color="#2c2d2e">class</font></div><div><font color="#2c2d2e">expression ([level_code]=1)</font></div><div><font color="#2c2d2e">minscaledenom 1000000</font></div><div><font color="#2c2d2e">maxscaledenom 500000</font></div><div><font color="#2c2d2e">…..</font></div><div> </div><div>But it didn’t <font color="#2c2d2e">work — apparently in layer of type chart keyword expression is not used in the same way as in other layers.</font></div><div>So, <font color="#2c2d2e">would be grateful if someone could help me with this.</font></div><div> </div><div><font color="#2c2d2e">Sincerely, Zmitser</font></div><div> </div><div> </div></div></div><div> </div><div>--<br>Zmitser Kozhukh</div></BODY></HTML>