charts

how can i add click evet to my rapahel pie chart?

旧时模样 提交于 2019-12-12 04:15:47
问题 How can I add click event to my Rapahel pie chart ? var r = Raphael("holder-1",340, 185); pie = r.g.piechart(150,85, 75, values , {legend: labels, legendpos: "east"}); i got the answer it is pie.click(function () { }); can i pass value to the onclick event ?, here can i pass values and labels to onclcik function ?? 回答1: According to the docs for the node attribute, you should just be able to attach events as you would any DOM element using it: pie.node.onclick = function () { /* Something */

stacked area graph in ggplot2 returned as stacked lines

纵饮孤独 提交于 2019-12-12 04:13:33
问题 I would like to plot (using ggplot) catch data by country per year using the stacked area. Yet, I'm having problems creating my stacked area chart; for some reason it is returning stacked lines: Med=read.csv("Med1950-2014.csv", header=T) y=as.numeric(Med$catch) x=as.numeric(Med$year) country=as.character(Med$fishing_entity) Medc<- data.frame(x,y1,country) ggplot(Medc,aes(x=x,y=y1))+ geom_area(aes(colour=country,fill=country), position = 'stack') I have tried also this: gg <- ggplot(Medc, aes

Adding 2 range of information in the same chart (chart.js)

有些话、适合烂在心里 提交于 2019-12-12 03:57:27
问题 I created a line type chart, using chart.js (2.5 version), exactly like in this example: http://codepen.io/SitePoint/pen/WGZGNE <div class="container"> <h2>Chart.js — Line Chart Demo</h2> <div> <canvas id="myChart"></canvas> </div> </div> .container { width: 80%; margin: 15px auto; } https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.2.2/Chart.min.js var ctx = document.getElementById('myChart').getContext('2d'); var myChart = new Chart(ctx, { type: 'line', data: { labels: ['M', 'T', 'W', 'T',

How to draw a chart like below using chart js

£可爱£侵袭症+ 提交于 2019-12-12 03:49:23
问题 I want to draw a Graph looks like below. i already have chart js library in my project so i can able to draw this graph using chart js Please advise me How to draw this graph. if not possible with chart js please suggest some other libraries 回答1: You can use Highcharts-ng with angular which has a gant chart feature var chart = new Highcharts.Chart({ chart: { renderTo: 'container' }, title: { text: 'SOTMP Checklist Compliance History' }, xAxis: { type: 'datetime' }, yAxis: { categories: [

Loop Updating Chart Image on Userform

五迷三道 提交于 2019-12-12 03:47:47
问题 Okay, So I am trying to integrate the following code: `Private Sub UserForm_Initialize() Dim Fname As String Call SaveChart Fname = ThisWorkbook.Path & "\temp1.gif" Me.Image1.Picture = LoadPicture(Fname) End Sub Private Sub SaveChart() Dim MyChart As Chart Dim Fname As String Set MyChart = Sheets("Data").ChartObjects(1).Chart Fname = ThisWorkbook.Path & "\temp1.gif" MyChart.Export Filename:=Fname, FilterName:="GIF" End Sub` from this post: Displaying "live" chart data in Excel Userform into

How to plot a 3D Graph to represent an object in space

≯℡__Kan透↙ 提交于 2019-12-12 03:46:42
问题 I have a robot that outputs x,y,z position in space. My problem is that I can only find 2D plot in windows forms using chart. I want to plot my robot in 3D space. Any tools I can use?? Something similar to this: I need a free software solution for this EDIT: My 2D graph atm: chart1.ChartAreas[0].AxisX.Minimum = 0; chart1.ChartAreas[0].AxisX.Maximum = 12; chart1.ChartAreas[0].AxisX.Interval = 1; chart1.ChartAreas[0].AxisY.Minimum = 0; chart1.ChartAreas[0].AxisY.Maximum = 7; chart1.ChartAreas[0

How to save Plotchart canvas other than PostScript without displaying it?

有些话、适合烂在心里 提交于 2019-12-12 03:43:42
问题 I read the section OTHER OUTPUT FORMATS of Plotchart documentation, but still can't figure out how to do it. I want to: Save canvas as image without displaying it. So I can run it in batch mode. Save in other format. (ex: jpeg, png...) A brief example is appreciated. 回答1: I didn't try this solution, but the man page you linked describes a saveplot command to store the plot into a Postscript (or other image format) file. Once you created your plot widget, you can do something like .plot

Simple bar chart d3

佐手、 提交于 2019-12-12 03:42:21
问题 Copying simple example for barchart as per D3.js page still I am not getting anything on my screen except left black line. Can someone help me out? HTML <!DOCTYPE html> <meta charset="utf-8"> <style> .bar { fill: steelblue; } .bar:hover { fill: brown; } .axis--x path { display: none; } </style> <svg width="960" height="500"></svg> <script src="https://d3js.org/d3.v4.min.js"></script> <script> var svg = d3.select("svg"), margin = {top: 20, right: 20, bottom: 30, left: 40}, width = +svg.attr(

How do I add multiple series to a Razor Helper Chart?

纵饮孤独 提交于 2019-12-12 03:39:47
问题 http://www.asp.net/webmatrix/tutorials/7-displaying-data-in-a-chart goes over how to create simple charts and they are working, but I can't seem to figure out how to add two data series (from two separate DB queries) to the same chart. 回答1: Have you tried calling the AddSeries() method twice, once for each database? 来源: https://stackoverflow.com/questions/4868590/how-do-i-add-multiple-series-to-a-razor-helper-chart

Copy chart and named range (excel 2010)

别等时光非礼了梦想. 提交于 2019-12-12 03:37:14
问题 I have the following issue with a named range within a chart when copying the tab. Using excel 2010. NAMED RANGE BAND ='TAB1'!$C$32:OFFSET('TAB1'!$C$32,0,COUNTA('TAB1'!$4:$4)-2) Selects only the fields in row 32 of table (in tab 'TAB1') from C32 where there is an entry in row 4. The end result, when working, ensures that there are no blank columns at the end of my chart. I then created a series in my chart using the named range: Series name: ='TAB1'!$B$32 (‘returns the word ‘BAND’) Series