+ Start a Discussion
Binu 8Binu 8 

Multiple series in line chart and command button issue

User-added image

Hi Team,

    Here I stucked with 2 things in my development.I have 2  questions to clarify my doubts. Before looking in to my doubts please check my attached screenshot.
    1. Here I placed a command button. I have no save/edit functionality is there. My requirement is when I click the Apply button the object data will
        filter with certain criteria. But what is here happenig is , I choose 2014 as year and then click Apply button that time the page totally refresh
        and it look like in the first time and year drop down value is 2015.I dont want the page refresh and need to data change in existing tables and charts.
        CODE IN VF :
        <apex:form >
                <apex:commandButton action="{!applyFilter}"  value="Apply" id="applyBtn"/>
        CODE IN APEX:

            public void applyFilter() {
   2. I want multiple line series in this line chart. Now I am showing only month wise data. Here I am showing different contries and their month wise data. So each series is different contry.The example data will be
     The total number of country will change as per the records in custom object.          Which chart I can Use? How can I do that?
    CODE IN VF :
        <apex:chart height="300" width="500" data="{!MothlyCustomerChurnList}">
            <apex:axis type="Numeric" position="left" fields="value" title="Month wise Churn Rate" grid="true"/>
                <apex:axis type="Category" position="bottom" fields="label"   title="Months of the Year">
            <apex:lineSeries axis="left" fill="true" xField="label" yField="value" markerType="cross" markerSize="4" markerFill="#FF0000"/>