0

I might have done something wrong but I really don't know how to fix this. Please help!

Any hints would be appreciated.


I want to show grouped bar chart and a line chart on the same chart.

X-axis: orderActualAmount(bar), orderPredictionAmount(bar), orderGoalAmount(line)

Y-axis: week(bar and line both)

<apex:chart data="{!chartRecordThisMonth}" height="500" width="1000">
<apex:legend position="bottom"/>
<apex:axis type="Numeric" position="left" grid="true"
    fields="orderActualAmount,orderPredictionAmount,orderGoalAmount" minimum="0" title="件数">
</apex:axis>
<apex:axis type="Category" position="bottom" fields="week" title="週">
</apex:axis>
<apex:lineSeries axis="left" xField="week" yField="orderGoalAmount" 
    markerType="circle" markerSize="4" markerFill="#8E35EF">
    <apex:chartTips height="20" width="120"/>
</apex:lineSeries>
<apex:barSeries colorSet="DarkSalmon,LightSteelBlue" orientation="vertical" axis="left" xField="week"
    yField="orderActualAmount,orderPredictionAmount" title="実績件数,予測件数">
</apex:barSeries>
</apex:chart>

This is the value of {!chartRecordThisMonth}.

ChartRecord:[orderActualAmount=7, orderGoalAmount=20, orderPredictionAmount=6, week=1w], 
ChartRecord:[orderActualAmount=6, orderGoalAmount=30, orderPredictionAmount=6, week=2w], 
ChartRecord:[orderActualAmount=7, orderGoalAmount=6, orderPredictionAmount=7, week=3w], 
ChartRecord:[orderActualAmount=6, orderGoalAmount=9, orderPredictionAmount=8, week=4w]

My problem is the lineSeries showing strange result on the chart. Despite tooltips showing "1w:20", "2w:30", "3w:6", "4w:9", the line plots are at "1w:0", "2w:1", "3w:2", "4w:3".

enter image description here

1 Answer 1

-1

Problem solved. I just changed orderGoalAmount variable to Integer and the problem's gone.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .