BetoDev
Members-
Content count
13 -
Joined
-
Last visited
About BetoDev
-
Rank
Junior Member
-
Render map when click on Chart plot. Fusioncharts
BetoDev replied to BetoDev's topic in User Showcase
Im trying to do this in c# but when i want to use configureLink i have the following error: Uncaught TypeError: GraficaEjecutivos.configureLink is not a function where GraficaEjecutivos is my id for my chart MyFirstChart = new Chart("bar2d", "GraficaEjecutivos", "100%", "550", "json", jsonData.ToString()); //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "funcion", "MyFirstChart", true); var funcion = @"generarMapa = function (e) { console.log(e.data.dataIndex); //let chart = '<%=MyFirstChart%>'; maptype = (e.data.categoryLabel).toLowerCase(); GraficaEjecutivos.configureLink({ renderAt: 'child-chart-container', type: maptype }); }"; MyFirstChart.AddEvent("dataplotClick", funcion.ToString()); -
Render map when click on Chart plot. Fusioncharts
BetoDev replied to BetoDev's topic in User Showcase
There is a way of do this in C# code behind? -
BetoDev started following Akash Biswas
-
BetoDev started following Color countries based on array of items, Render map when click on Chart plot. Fusioncharts, Redo charts when click on plot and and 1 other
-
I want to render a Map using Fusioncharts when click on some plot in other Chart, so far i can not achieve this, how could i do that? I have the following code: In code behind C# Function that i want to display when click on other chart: [System.Web.Services.WebMethod()] [System.Web.Script.Services.ScriptMethod()] public static void GraficaMundial(int id) { //some code here Chart sales = new Chart(); // Setting chart id //sales.SetChartParameter(Chart.ChartParameter.chartId, "myChart3"); // Setting chart type to world chart sales.SetChartParameter(Chart.ChartParameter.chartType, "worldwithcountries"); // Setting chart width to 600px sales.SetChartParameter(Chart.ChartParameter.chartWidth, "100%"); // Setting chart height to 350px sales.SetChartParameter(Chart.ChartParameter.chartHeight, "550"); sales.SetChartParameter(Chart.ChartParameter.dataFormat, "json"); sales.SetChartParameter(Chart.ChartParameter.dataSource, jsonData.ToString()); var LtGraficoPaises = new Literal(); LtGraficoPaises.Text = sales.Render(); } Code of the Chart that I would like the map to display private void GraficaEjecutivo() { //some code here StaticSource source = new StaticSource(chart); FusionCharts.DataEngine.DataModel model = new DataModel(); model.DataSources.Add(source); var bar = new Charts.BarChart("scroll_chart_db"); //bar.Scrollable = true; bar.ThemeName = FusionChartsTheme.ThemeName.FUSION; bar.Data.Source = model; bar.Caption.Text = "RFQ Totales por Ejecutivo"; bar.SubCaption.Text = "2016-2017"; bar.XAxis.Text = "Ejecutivos"; bar.YAxis.Text = "Clientes"; bar.Width.Percentage(100); bar.Height.Pixel(400); var funcion = @"function(eventObj, dataObj){ document.getElementById('GraficoPaises').innerHTML = PageMethods.GraficaMundial(1); }"; bar.Events.AttachGenericEvents(FusionChartsEvents.GenericEvents.DATAPLOTCLICK, funcion.ToString()); LtGraficoPorEjecutivo.Text = bar.Render(); } In .aspx Literal that render the Map <div class="col-sm-12 text-center" id="GraficoPaises"> <asp:Literal ID="LtGraficoPaises" runat="server"> </asp:Literal> </div> I did tests, and when i click on the bar of my chart (GraficaEjecutivo method) the event is working propertly, but im not be able to display or render my map. What im doing wrong? I hope you can help me.
-
I have three charts, and one mapwithcountries. The thing i would like to do is when click on some plot(column or bar) in one of my three charts i want to "redo" the others charts(column, bar, donut, map) with the specific data about that clicked plot. So how could i achieve this? I know there is events for those charts, but i dont know how to render again (or update) those charts with specific clicked plot. I hope you can help me. Thanks in advance
-
Thanks for the reply. There is a possibility if only display a modal only for those countries with value and not for countries with no values?. Because that events are for the entire map, and i just want only to countries with values. Thanks in advance
- 8 replies
-
- fusionmaps
- asp.net
-
(and 1 more)
Tagged with:
-
Thanks, that's better
-
There is a possibility to do that example in code behind in C#? or how could i combine this js with C#. I'm new doing this and i want some help. I'm trying to do this but is not working: var chart1 = "{" + "'chart':{" + "'showlegend':'0'," + "'caption':'Clientes por ejecutivo en el mundo'," + "'nullentityfillcolor':'#43ccfe'," + "'showmarkerlabels':'0'," + "'showentityhovereffect':'1'," + "'theme':'fusion'" + "}," + "'colorrange': {" + " 'minItems': '1'," + "'code': '#004d80'"+ "}," + "'data':[" + "{" + "'id':'05'," + "'value': ['1','2','3']" + "}," + "{" + "'id':'101'," + "'value': [3]" + "}," + "{" + "'id':'16'," + "}," + "{" + "'id':'27'," + "'value': '8'" + "}," + "]," + "'events':{" + " 'entityClick': function(e,data){alert('Hi');}" + "}" + "}";
- 8 replies
-
- fusionmaps
- asp.net
-
(and 1 more)
Tagged with:
-
There is a possibility to do that example in code behind in C#? or how could i combine this js with C#. I'm new doing this and i want some help.
- 8 replies
-
- fusionmaps
- asp.net
-
(and 1 more)
Tagged with:
-
Oops, i forgot to paste the link, that link https://www.fusioncharts.com/dev/map-guide/custom-entity-ids was the guide, but i can not change id's to another integer id's. As i wrote, my intention is change id 05 (Canada) to id = 16 (just a example). Because i want to use only integer id's and i want to "interchange" the id's because from my database i have countries but are different id's. That's the reason i want to do that, there is a option to do this?
-
Hi, i followed this link to change IDs, but the way i'm doing is not working. I have the following example: var chart1 = "{" + "'chart':{" + "'showlegend':'0'," + "'caption':'Ejemplo'," + "'nullentityfillcolor':'#43ccfe'," + "'showmarkerlabels':'0'," + "'showentityhovereffect':'1'," + "'theme':'fusion'" + "}, 'entityDef' : [ {'internalId': '05', 'newId' : '01'}, {'internalId': '80', 'newId' : '16'}]," + "'data':[" + "{" + "'id':'05',"+ "'value': '16'," + "'color' : '#004d80'" + "}" + "]" + "}"; If you see, i want to change the 05 Id to 01 (is just a example) So Canada (id = 05) would be id = 01. So is this possible? Because i don't have results. I want to know if there is a possibility to do something like that, because in a future i want to retrieve my own id from my database to set newId (with number). Hope you can help me to achieve this. Thanks in advance
-
Ok i understand, the other posibility is set a value for the number of clients per employees(executive). For example if i want to color Mexico and India, maybe Mexico will have 5 clients, and India 10 clients. The other thing i would want to do is, when click one of these countries i want to display maybe in a tooltext, or modal which clients they have. How could i do this with that example that i provided?. Is it possible? Thanks in advance
- 8 replies
-
- fusionmaps
- asp.net
-
(and 1 more)
Tagged with:
-
I'm trying to color countries based on arrray of items, but the only solution i've seen is only color countries with ONE VALUE. I want to color countries if has for example 3 items, that could be numbers, or names (string). So far i can not implement this, i don't know if this is possible. Example: India has 2 values, (Name1, Name2) and i want to color that country because has at least 1 item. All of this is in ASP.NET C# My code below: var chart1 = "{" + "'chart':{" + "'showlegend':'0'," + "'caption':'Clientes por ejecutivo en el mundo'," + "'nullentityfillcolor':'#43ccfe'," + "'showmarkerlabels':'0'," + "'showentityhovereffect':'1'," + "'theme':'fusion'" + "}," + "'colorrange': {" + " 'minItems': '1'," + "'code': '#004d80'"+ "}," + "'data':[" + "{" + "'id':'05'," + "'value': ['1','2','3']" + "}," + "{" + "'id':'101'," + "'value': [3]" + "}," + "{" + "'id':'16'," + "}," + "{" + "'id':'27'," + "'value': '8'" + "}," + "]" + "}"; I hope you can help me
- 8 replies
-
- fusionmaps
- asp.net
-
(and 1 more)
Tagged with: