How to see previous graph after drill down in echarts? - drilldown

I am trying to see the previous graph after drill down in echarts bargraph. I have changed the setOption after the user clicks the bar series.
User click on the bar series and then the graph will change. I want to visit the previous graph before clicking.
bargraph.on('click',function(params){
if(params.componentType == 'series'&& params.name =='shirt')
setInterval(function(){
bargraph.setOption(baroption2)
},200);
})

You should store the previous graph's option like previousOption,
When you want to see the previous graph, use setOption(previousOption).
Now you can see the previous graph again.

Related

Add url redirect to mapbox icon

I am trying to allow a mapbox marker to be clicked on and when clicked it automatically takes you to a new link.
Is this possible?
I currently have a map of 10 locations and when loaded the zoom level shows all. When you click on a location, it zooms you into that location.
I now want it to take you through to a url on the click rather than zoom in, however I cant seem to find any documentation on how to do it.
I am aware that it can be done using a popup box which contains a url in it, but is there a way to remove the extra step.
Thank you
You can use click event on your layer to get the feature clicked and use a property of your feature to build your link :
map.on('click', 'layername', function(e) {
// Here you can access e.features[0] which is the feature cliked
// With that you can do whatever you want with your feature
});
Sébastien Bousquet's answer work when using a Symbol, but if using a Marker, you'll need to add your your own click eventlistener like https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event.
marker.getElement().addEventListener('click', event => {
window.location.href = 'https://www.mapbox.com/';
});

How can I access a pushpin already added on the map later with the help of some ID? (Bing maps V8)

I have a map where I have added many pushpins & have attached an id with each one of them.
Now, there's a listing of these locations on the right hand in list, I want to highlight a particular pin on click of it's corresponding listing. How do I access these pushpins with the help of id?
I simply want to do something like this: (This is just a random pseudocode, not an actual function)
var e=Microsoft.maps.getPushpin(someID);
Take a look at this code sample. It should how to create a list based on pushpin data and link it back to the pushpins themselves using an id: http://bingmapsv8samples.azurewebsites.net/#QueryAPI_Paging
Source Code: https://github.com/Microsoft/BingMapsV8CodeSamples/blob/master/Samples/Spatial%20Data%20Services/QueryAPI_Paging.html

Project data doesn't updates / Mapbox

I'm using Mapbox editor (https://www.mapbox.com/editor) for editing my maps.
But after first save, only Editor view updates with new data.
So, I'm adding new markers and press Save and see changes on the screen.
But my embeded map doesn't have new updates.
I've also checked 'markers.geojson' and Share link, both have only first time saved data.
I've checked diff preferences but can't find anything related to this issue...
Got response from Mapbox:
"Between the time that you edit data on your maps and when the GeoJSON
public representation (your markers) updates, there's a delay of up to
an hour. Hope this helps and let me know if you have questions."
Yes, looks like it updates with delay or how i suppose rather ones per hour.

Clickable barchart, where clicking on any bar would redirect to concern information page

I`m making student progress tracking system, where I need to show the progress chart on every subject.
Here every bar represent the subject, while clicking on any bar(subject) would produce another chart that is showing the progress of that particular subject.
I want every bar of bar-chart click-able that I can fire the event by clicking on that, so any help on that?(I am using ASP.NET(C#) for development)
You just need to bind a click event to the chart by inserting in page_load the following code: this.CT_RT_DB_Pt3_1.Click += new ImageMapEventHandler(Chart1_Click); And then add the protected void Chart1_Click(object sender, ImageMapEventArgs e) method inside the inherited page class, and use e.PostBackValue to specify the subject clicked..
Specify the postback value to be the xaxis label of the bar clicked in the .aspx file: <asp:Series Name="Series1" PostBackValue="#AXISLABEL"></asp:Series>
You can easily implement this with Flash or JavaScript version of amCharts
The charts are client-side so all you need to do on the server is generate your data in CSV or
XML format and feed it to the charting controls.

DataFormWebPart accessing previous versions of an item in WSS3.0

I am running WSS3.0 and have a custom list which contains versioning on a couple of fields. When I click on an item and I view the item page I see the history of all the fields which I have made changes to. This works fine as expected.
I have also created a page using Microsoft Office Sharepoint Designer and using a DataFormWebPart I have created a page that shows all the items in the list in a list view, I have also changed the XSL node of the DFWP to display the datain a way that my client wants.
The issue that I have is, it is only showing the latest version of the item record e.g. some of the fields are blank as the client did not update those fields the last time that the item was saved. I can fully understand why it is not showing these previous versions of the item but is there anyway that I can change an option in the webpart that will return that last non blank version of the field?
If this is not possible does anybody know if it is possible to change the edit page for the item so that it defaults certain fields to have the previous value of the field.
Many thanks for you ideas in advance
Jonathan
I eventually was able to add the following jQuery code at the bottom of the page (using Sharepoint Designer). You will also need to add a link at the top of the page to include a link to the jQuery code (or you can install it as a feature).
<script>
jQuery.fn.GetLastUpdate = function () {
$updates = this.parent().next().clone();
$("nobr", $updates).remove();
$("a", $updates).remove();
$("br", $updates).remove();
$lastUpdate = $updates.text().split("(): ")[1]; //.find("a").replaceWith("##++##").text();
this.text($lastUpdate);
return $lastUpdate;
}
$("[title='CONTROL_TITLE']").GetLastUpdate();
</script>
Then you just have to replace the CONTROL_TITLE with the title of the text box that you want to auto fill.