Hi Maria Jose, yes, that seems much better :) Since the EChartComponent only holds 1 chart, it makes more sense to make it extend from UIBase. Also in your usage example I think you can remove the intermediate VGroup since the CardPrimaryContent is enough.
El jue., 3 sept. 2020 a las 14:08, Maria Jose Esteve (<[email protected]>) escribió: > Hi, Carlos > > Ok, I have already created a basic control, without support for Themes [1]: > > > > ... > > [Event(name="onConfig", > type="com.proj.example.echarts.events.EChartsEvent")] > > [Event(name="onInicialize", > type="com.proj.example.echarts.events.EChartsEvent")] > > /** > > * The default property uses when additional MXML content > appears within an element's > > * definition in an MXML file. > > */ > > [DefaultProperty("instanceECharts")] > > > > COMPILE::JS > > public class EChartsBasicControl extends StyledUIBase > > { > > > > /** > > * @royaleignorecoercion > org.apache.royale.core.WrappedHTMLElement > > * @royaleignorecoercion > org.apache.royale.html.util.addElementToWrapper > > */ > > override protected function createElement():WrappedHTMLElement > > { > > addElementToWrapper(this, > 'div'); > > return element; > > } > > ... > > > > In a basic view, we would specify it like this [2]: > > > > <j:CardPrimaryContent itemsVerticalAlign="itemsCenter" > itemsHorizontalAlign="itemsCenter" > > > <j:VGroup localId="cardContent" gap="3" height="100%" > width="100%" className="wrapper"> > > <localecharts:EChartsBasicControl > localId="charComp" height="100%" width="100%" > > autoLoad="{itemChartDef.autoLoad}" > configOption="{itemChartDef.optionChartInit}" > > onConfig="afterConfig(event)" > onInicialize="afterInit(event)"/> > > </j:VGroup> > > </j:CardPrimaryContent> > > > > I know that the implementation is not the best, but I will continue in > this line and then I will ask "the experts" for your opinion. > > Now I'm going to see if I can implement the Themes. š > > > > Thanks for the help Carlos. > > > > > > [1] > https://github.com/mjesteve/Royale-ECharts/blob/themes/loadLocal/royale-echarts-examples/src/main/royale/com/proj/example/echarts/EChartsBasicControl.as > > > > [2] > https://github.com/mjesteve/Royale-ECharts/blob/themes/loadLocal/royale-echarts-examples/src/main/royale/com/proj/example/views/EChartsExampleBasic.mxml > > > > Hiedra > > > > > > -----Mensaje original----- > De: Carlos Rovira <[email protected]> > Enviado el: miĆ©rcoles, 2 de septiembre de 2020 16:29 > Para: Apache Royale Development <[email protected]> > Asunto: Re: Crux - Inject model in Bead > > > > Hi Maria Jose, > > > > El miĆ©., 2 sept. 2020 a las 13:56, Maria Jose Esteve (<[email protected] > <mailto:[email protected]>>) > > escribió: > > > > > > > > We need a simple container that allows content wrapping, maybe HGroup? > > > > > > > > No. Just UIBase, since you are going to add the Chart to it right? > > Take a look at for example Jewel PopUp has other content but it's > StyledUIBase > > So: > > > > - Container, Group,..: add content the user wants at runtime > > - UIBase, StyledUIBase, ...: you know exactly what you want to add ;-) > > > > > > > > > -- > > > Carlos Rovira > > > http://about.me/carlosrovira > > > > > > > > > > > > > -- Carlos Rovira http://about.me/carlosrovira
