Jump to content
JChartFX Community
  • 0

Filter chart




I am a JChartFX licensed user. I am developing a product using JchartFX.

We have a situation where we have one dashboard and different charts in that. We need to filter or change data according to any event or something. Is there any facility in JChartFX to filter data on same charts?
More Explanation of  scenario : if you have one project dashboard containing lots of charts, what would you recommend we do to support more than one project?

Thanks in advance. 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

You can modify any (or all) of the charts after any event captured on the client, e.g.

<select id="year" onchange="onYearChanged()">
<option value="1997">1997</option>    
<option value="1998">1998</option>    
<option value="1999">1999</option>    
<div id="ChartDiv" style="width:550px;height:400px;display:inline-block"></div>



function onLoadDoc()
    chart1 = new cfx.Chart();

function onYearChanged()
    var selectObj = document.getElementById("year");
    if (selectObj.value == "1997")
    else if (selectObj.value == "1998")

Obviously instead of hardcoding data you would either request new data to the server or filter existing data, once you have the data you can invoke setDataSource on the chart to change its data, if necessary you can also change any of the charts visual attributes.

We do not offer any APIs to filter data




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...