ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  LegendBox suppress non-custom entries
Posted by Marcus on Sep-28-2020 17:53
Hi

I want to suppress non-custom entries in a LegendBox, in any case.
(I can suppress it with solid line and point style: no shape.)

I have a LegendBox* p_legend_box
And I suppress non-custom Keys with a trick:

p_legend_box->setText("r");
p_legend_box->setKeySize(0,0,0);
p_legend_box->setKeyBorder(Chart::Transparent);

And I add custom Keys with p_legend_box->addKey()


BUT when I change the Linestyle to something not solid
      OR Pointstyle to something not "no shape"

      BY:
      LineLayer->addDataSet(data, color_with_style_info)
      or
      DataSet->setDataSymbol(point_style, ....

THEN: the non-custom entries in the LegendBox comes back again.

Thanks Marcus

  Re: LegendBox suppress non-custom entries
Posted by Peter Kwan on Sep-28-2020 20:06
Hi Narcus,

If you have a LineLayer or other layers, you can use Layer.setLegendOrder to suppress automatically legend entries. For example:

myLineLayer->setLegendOrder(Chart::NoLegend);

Regards
Peter Kwan

  Re: LegendBox suppress non-custom entries
Posted by Marcus on Sep-28-2020 20:53
Thank you this works fine.

Regards
Marcus