I see the chart perfectly. I then stop the B4J process (leaving IE browser alive) and change the Pie Chart code to:
B4X:
Private Sub CreatePieChartData(cols As List, rows As List)
cols.Add(CreateColumn("", "Topping", "string"))
cols.Add(CreateColumn("", "Slices", "number"))
rows.Add(CreateRow(Array As Object("Mushrooms", 3)))
rows.Add(CreateRow(Array As Object("B4X", 1))) 'was Onions
rows.Add(CreateRow(Array As Object("Olives", 1)))
rows.Add(CreateRow(Array As Object("Zucchini", 1)))
rows.Add(CreateRow(Array As Object("Pepperoni", 2)))
End Sub
So, I am only changing "Onions" to "B4X". I then run the B4J app again and refresh the IE browser. It still shows "Onions" and not "B4X".
If I however (while the B4J process is still running - i.e not killing it) close IE and restart IE then the new Pie Chart has the correct legend - it then shows "B4X" and not "Onions".
Am I missing something here? Why does the change from "Onions" to "B4X" only takes place when I stop and restart IE?
Interesting - it works with Chrome...So why does IE not "refresh" the same as what Chrome does? How does one get around this issue to ensure IE responds the same way as Chrome?
The problem is in the ajax calls. Add: cache: false
Example:
B4X:
$.ajax({
url: "chartsHelper?type=bar",
dataType:"json",
cache: false,
success: function(result) {
var data = new google.visualization.DataTable(result.data);
var chart = new google.visualization.BarChart($("#bar_chart")[0]);
chart.draw(data, result.options);
}
});