Only one series is displaying data


Pat,

I think you may have a scale issue. The Values axis for your Inventory series shows 0-5, but for Production, it shows 0-125. Try adding a second data axis and assigning one of the series to it.

Tried it. No dice.

What does the new chart look like? Do you see both axes? Also, could you post your chart XML?

Reordered series again. Added Axis for each of the two series. Still no dice.

Did a console.log of series names and y values.

Series: Inventory White Oak: 0 Glue: 0 Cardboard: 0 White Paint: 0 Series: Production White Oak: 23.1 Glue: 60 Cardboard: 120 White Paint: 26.4 

Whichever is the first series seems to get it’s y value negated.

Here’s the XML.

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true"> <models> <model id="MatMgnt_MatRecTypes" limit="" query="true" createrowifnonefound="false" adapter="" type="" sobject="RecordType"> <fields> <field id="Name"></field> <field id="Id"></field> </fields> <conditions> <condition type="fieldvalue" value="Material_mB __c" enclosevalueinquotes="true" field="SobjectType"></condition> </conditions> <actions></actions> </model> <model id="MatMgnt_Materials" limit="" query="true" createrowifnonefound="false" adapter="" type="" sobject="Material_mB__ c"> <fields> <field id="Name"></field> <field id="Minimum_Lead_Time_in_Days __c"></field> <field id="Price_Date_RU_Best__ c"></field> <field id="Price_Date_RU_Last __c"></field> <field id="Quality__ c"></field> <field id="Quality __r.Name"></field> <field id="Quantity__ c"></field> <field id="Quantity_Needed __c"></field> <field id="Quantity_Used__ c"></field> <field id="RecordTypeId"></field> <field id="RecordType.Name"></field> <field id="Master __c"></field> <field id="Master__ r.Name"></field> <field id="Unit __c"></field> <field id="Best_Price_Vendor_Id__ c"></field> <field id="Last_Minute_Vendor __c"></field> <field id="Best_Price__ c"></field> <field id="Inventory_Quantity __c"></field> </fields> <conditions> <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="RecordTypeId" state="filterableoff" inactive="true" name="RecordTypeId"></condition> </conditions> <actions></actions> </model> <model id="MatMgnt_MaterialAgg" limit="" query="true" createrowifnonefound="false" adapter="" type="aggregate" sobject="Material_mB__ c"> <fields> <field id="Quantity __c" name="sumProductQuantityc" function="SUM"></field> <field id="Quantity_Needed__ c" name="sumProductQuantityNeededc" function="SUM"></field> <field id="Quantity_Used __c" name="sumProductQuantityUsedc" function="SUM"></field> <field id="Price_Date_RU_Best__ c" name="maxPriceDateRUBestc" function="MAX"></field> <field id="Price_Date_RU_Last __c" name="maxPriceDateRULastc" function="MAX"></field> <field id="Inventory_Quantity__ c" name="sumInventoryQuantityc" function="SUM"></field> </fields> <conditions> <condition type="fieldvalue" value="01210000000V3ErAAK" enclosevalueinquotes="true" field="RecordTypeId" operator="!="></condition> </conditions> <actions></actions> <groupby method="simple"> <field id="RecordTypeId" name="recordTypeId"></field> <field id="RecordType.Name" name="recordTypeName"></field> <field id="Master __r.Name" name="masterrName"></field> </groupby> </model> <model id="MatMgnt_MatVendorPricing" limit="20" query="true" createrowifnonefound="false" adapter="" type="" sobject="Account_Material_mB__ c"> <fields> <field id="Material __c"></field> <field id="Material__ r.Name"></field> <field id="Vendor __c"></field> <field id="Vendor__ r.Name"></field> <field id="Price_Date __c"></field> <field id="Price_per_Unit__ c"></field> <field id="Lead_Time_in_Days __c"></field> <field id="AMOCC_Declared_Quality__ c"></field> <field id="AMOCC_Declared_Quality __r.Name"></field> <field id="Name"></field> </fields> <conditions> <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Material__ c" state="filterableoff" inactive="true" name="Material __c"></condition> </conditions> <actions></actions> </model> </models> <components> <tabset rememberlastusertab="true" defertabrendering="true" uniqueid="sk-1PHWpl-179" renderas=""> <tabs> <tab name="Materials"> <components> <skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="50" createrecords="true" model="MatMgnt_Materials" buttonposition="" mode="read" uniqueid="sk-1585gO-95"> <fields> <field id="Name"></field> <field id="Unit__ c" valuehalign="" type=""></field> <field id="Minimum_Lead_Time_in_Days __c" decimalplaces="" valuehalign="" type=""> <label>Min Lead Time</label> </field> <field id="Price_Date_RU_Best__ c" valuehalign="" type="" readonly> <label>Order By Best Price</label> </field> <field id="Price_Date_RU_Last __c" valuehalign="" type="" readonly> <label>Last Minute Order Date</label> </field> <field id="Quality__ c" valuehalign="" type=""></field> <field id="Quantity __c" decimalplaces="" valuehalign="" type=""></field> <field id="Quantity_Used__ c"></field> <field id="Quantity_Needed __c"></field> <field id="RecordTypeId" valuehalign="" type="REFPICK"> <label>Type</label> </field> <field id="Inventory_Quantity__ c" decimalplaces="" valuehalign="" type=""></field> <field id="Master __c" valuehalign="" type=""> <filters> <filter type="fieldvalue" operator="=" enclosevalueinquotes="true" field="RecordType.Name" value="Master"></filter> </filters> </field> </fields> <rowactions> <action type="edit"></action> <action type="delete"></action> <action type="popup" label="View record details" icon="sk-icon-popup"> <popup width="80%" title="Viewing {{Model.label}}: {{Name}}"> <components> <pagetitle model="MatMgnt_Materials" uniqueid="sk-1QKOZi-402"> <maintitle> <template>{{Name}}</template> </maintitle> <subtitle> <template>{{Model.label}}</template> </subtitle> <actions> <action type="savecancel"> <actions></actions> <models> <model>MatMgnt_MatVendorPricing</model> </models> </action> </actions> <conditions> <condition type="contextrow" field="Id" mergefield="Id" autocreated="true"></condition> </conditions> </pagetitle> <basicfieldeditor showheader="true" showsavecancel="false" mode="read" model="MatMgnt_Materials" buttonposition="" uniqueid="sk-1QLSgM-220"> <conditions> <condition type="contextrow" field="Id" mergefield="Id" autocreated="true"></condition> </conditions> <columns> <column width="50%"> <sections> <section title="Section A" collapsible="no" showheader="false"> <fields> <field id="Name"></field> <field id="Minimum_Lead_Time_in_Days__ c"></field> <field id="Best_Price_Vendor_Id __c"></field> <field id="Last_Minute_Vendor__ c"></field> <field id="Best_Price __c"></field> </fields> </section> </sections> </column> <column width="50%"> <sections> <section title="Section B" collapsible="no" showheader="false"> <fields> <field id="Quality__ c" valuehalign="" type=""></field> <field id="Quantity __c"></field> <field id="Quantity_Needed__ c"></field> <field id="Quantity_Used __c"></field> <field id="RecordTypeId" valuehalign="" type=""></field> <field id="Master__ c"></field> </fields> </section> </sections> </column> </columns> </basicfieldeditor> <tabset rememberlastusertab="true" defertabrendering="true" uniqueid="sk-1QKzR0-171" renderas=""> <tabs> <tab name="Vendor Pricing"> <components> <skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="MatMgnt_MatVendorPricing" buttonposition="" mode="read" uniqueid="sk-1QLjPb-239"> <fields> <field id="Name" valuehalign="" type="" required="true"></field> <field id="Vendor __c" valuehalign="" type=""></field> <field id="Price_Date__ c" valuehalign="" type=""></field> <field id="Price_per_Unit __c" decimalplaces="" valuehalign="" type="" required="true"></field> <field id="Lead_Time_in_Days__ c" decimalplaces="" valuehalign="" type="" required="true"></field> <field id="AMOCC_Declared_Quality __c" valuehalign="" type=""></field> </fields> <rowactions> <action type="edit"></action> <action type="delete"></action> </rowactions> <massactions usefirstitemasdefault="true"> <action type="massupdate"></action> <action type="massdelete"></action> </massactions> <views> <view type="standard"></view> </views> <conditions> <condition type="contextrow" field="Material__ c" mergefield="Id" autocreated="true"></condition> </conditions> </skootable> </components> </tab> </tabs> </tabset> </components> </popup> <renderconditions logictype="and"> <rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="MatMgnt_Materials" sourcetype="fieldvalue" field="RecordType.Name" value="Master"></rendercondition> </renderconditions> </action> </rowactions> <massactions usefirstitemasdefault="true"> <action type="massupdate"></action> <action type="massdelete"></action> </massactions> <views> <view type="standard"></view> </views> <filters> <filter type="select" filteroffoptionlabel="Type" createfilteroffoption="true" affectcookies="false" autocompthreshold="25" conditionsource="manual" conditionfield="RecordTypeId" labelmode="no" condition="RecordTypeId"> <sources> <source type="model" effectsbehavior="justdefault" model="MatMgnt_MatRecTypes"> <labeltemplate>{{{Name}}}</labeltemplate> <valuetemplate>{{Id}}</valuetemplate> </source> </sources> </filter> </filters> </skootable> </components> </tab> <tab name="Chart" loadlazypanels="true"> <components> <skuidvis __chart model="MatMgnt_MaterialAgg" maintitle="{{Model.labelPlural}}" type="area" uniqueid="sk-1QKuQM-148" rendersnippet="testSnippet"> <dataaxes> <axis id="axis1" minvalue="0" maxvalue="125" title="Inventory" flip="true"></axis> <axis id="axis2" minvalue="0" maxvalue="125" flip="false" title="Production"></axis> </dataaxes> <categoryaxes> <axis id="categories" categorytype="field" field="masterrName"></axis> </categoryaxes> <serieslist> <series valuefield="sumInventoryQuantityc" splittype="field" splitfield="recordTypeName" categoryfield="masterrName" type="" dataaxisid="axis1"></series> <series valuefield="sumProductQuantityNeededc" splittype="field" splitfield="recordTypeName" categoryfield="masterrName" type="" dataaxisid="axis2"></series> </serieslist> <colors></colors> <legend layout="horizontal" halign="center" valign="bottom"></legend> <renderconditions logictype="and"></renderconditions> </skuidvis__ chart> <skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="false" model="MatMgnt_MaterialAgg" buttonposition="" mode="readonly" uniqueid="sk-1PHYpO-195"> <fields> <field id="Master __r.Name" name="masterrName" valuehalign="" type=""> <label>Material</label> </field> <field id="Quantity_Needed__ c" name="sumProductQuantityNeededc" decimalplaces="" valuehalign="" type=""> <label>Needed</label> </field> <field id="Inventory_Quantity__c" name="sumInventoryQuantityc" decimalplaces="" valuehalign="" type=""> <label>Inventory</label> </field> <field id="RecordType.Name" name="recordTypeName"></field> </fields> <rowactions></rowactions> <massactions usefirstitemasdefault="true"></massactions> <views> <view type="standard"></view> </views> </skootable> </components> </tab> </tabs> </tabset> </components> <resources> <labels></labels> <javascript> <jsitem location="inlinesnippet" name="testSnippet" cachelocation="false">var chart = arguments[0], $ = skuid.$; if (chart.series.length > 0){ $.each(chart.series, function(cs,cSeries){ var cSeriesData = cSeries.data; console.log('Series: ' + cSeries.name); $.each(cSeriesData,function(c,cData){ console.log(cData.name + ': ' + cData.y); }); }); } </jsitem> </javascript> <css></css> </resources> <styles> <styleitem type="background" bgtype="none"></styleitem> </styles> </skuidpage>

If you take the Max Value off your Inventory axis, does it make a difference?

Wait, I think I see it. You do need to remove that Max Value property, but I think you also need to change the Split. Both series are getting split by the same values, so the last one in is writing over the first one. Try using Template mode for both series and enter whatever text you want to show up (say Inventory and Production).

Split values was the issue. Really shouldn’t be though. I should be able to use the same field on each series and not affect the other.

A new issue now though. The categories names are doubled.


Well, I think you would end up with something like the screenshot that you just posted: each series split into two. Splits take a single series and “split” it into one or more series based on whatever data you’ve got at runtime. If you want to evaluate each series you create individually, you’ll split each one individually too. I think what you actually want is to split on Record Type Name but conditionally select your Data Field based on record type. You could do this with a UI-Only Formula field like…

<field id="EffectiveAmount__ui" uionly="true" displaytype="FORMULA" precision="9" scale="2" label="Effective Amount" defaultValue="0" readonly="true" returntype="DOUBLE"> <formula>IF({{recordTypeName}}=="Inventory",{{sumInventoryQuantityc}},{{sumProductQuantityUsedc}})</formula> </field>

Add this field to your aggregate model (note: the formula may need to be adjusted, of course), and use it as the Data Field for your one and only Chart series, splitting on Record Type Name. However, you’ll still have the problem with scale where one series would dwarf the other. You would have to write some JavaScript to assign one of the two series to the second axis. The code free solution is to use two models, one for each Record Type. Either one can be the chart’s model, then the other will be the model for your second series. Make sense?

No dice. Series didn’t the UI-Only field.


Highcharts error #14 means that it’s trying to plot a string value to a data axis (which requires a number). Check the model data for that formula field. If it’s not showing numbers, something is wrong with the formula (or with my assessment of the data model, always a possibity). I tested it with the Opportunity object in our Dev Org and principle, this approach does work. Also, it looks like scaling may not be a problem after all.