Questions tagged [charts]

1

votes
2

answer
932

Views

d3 re rendering chart exit is not a function

I am trying to make sure that i can update my charts data with D3 for this i have the following function: fetchData(scope.filters.title_id, scope.filters.competence_id, scope.filters.from, scope.filters.to).then(function (data) { color.domain(d3.keys(data[0]).filter(function (key) { return key !== '...
Marc Rasmussen
0

votes
0

answer
2

Views

How can I format a chart legend and create a legen in one line relyong on a variable being true?

I need to add a legend to the chart and format it at the bottom right of the chart if isLegend = True With Monthly If isLegend = True Then .HasLegend = True .HasTitle = True If isTitle = True Then .ChartTitle.Text = Range('A1')
VBAuser12345
1

votes
2

answer
46

Views

How do I create a legend for a bar chart?

How do I create legends like the following: So far I have the following: I can't figure out how to specify labels for the legend. They don't provide examples either. https://www.chartjs.org/docs/latest/configuration/legend.html So far I have the following code: var topClickSourcesChart = new Chart('...
Chloe
1

votes
0

answer
31

Views

Google charts script return error on feed Data column(s) for axis #0 cannot be of type string

The following script using Google charts returns a error Data column(s) for axis #0 cannot be of type string Basically booking are made daily and are Active when a booking has been seen it will be given different attribute. It should count the booking1_date and return a number for that date and dis...
user3285278
1

votes
0

answer
622

Views

Cannot read property 'DataTable' of undefined in google charts

as the title saying im getting this error when trying to get charts inside function in another file like this functions.php function get_likes($catid){ require dirname (__FILE__).'/dbfunction.php'; ?> google.charts.load('current', {'packages':['corechart']}); a= ; b= ; c= ; i= ; ///// this i is...
Samir Daraf
1

votes
2

answer
73

Views

Google chart not draw

I have a one question. google chart not draw. Here is my code google.load('visualization', '1', {packages:['corechart']}); google.setOnLoadCallback(drawChart); function drawChart() { var jsonData = $.ajax({ url: '/temhum', dataType:'json', }).done(function (jsonData) { var data = new google.visuali...
전준휘
1

votes
0

answer
29

Views

Bar Chart Design Issue

I have below chart to design, i have tried so many bar chart to design below chart but not able to do that as its have 5 different data in single column. and y-axis will have time range like 2002 to 2005 and last column data will be like starting value and ending value of 2002 to 2005 45000,49000 An...
krupal parsana
1

votes
0

answer
373

Views

Adding legend into a pie chart in chart.js

I am using chart.js to add in a legend to my pie chart but because I am following this link, https://jsfiddle.net/red_stapler/9931gjh6/11/, to do it, I am unsure of how it works. Sorry I just started learning on how to create a pie chart so there are a lot of things I am still weak at. I want in my...
blastme
1

votes
1

answer
37

Views

Chart.js adds second lines values to first

I have bar/line chart on my page and there is two lines and four bar values. The first line is average value, that is one straight line, so it is array that filled with same number. Second line has different values that are not related to first line number. The think is that the first line raises t...
pinq-
1

votes
1

answer
155

Views

Create multiple Smoothie.js charts in a for() loop

I tried to use Smoothie.js to make some CPU usage charts (something similar to the server load example). I made a for() loop to create a TimeSeries and a SmoothieChart element for each core, then a small updater function to add the latest load data (replaced in the snippet below by a random() functi...
Squared
1

votes
1

answer
550

Views

How to set Value Axis Label Format on QML from milliseconds to mm:ss?

Background I am using QtCreator and I have a file called myScopeView.qml, which represents a scope view similar to the example provided here. In myScopeView.qml, there is a ChartView that is updated every second with a timer so the plot changes values on X axis and Y axis. X axis represents time exp...
titiro89
1

votes
0

answer
42

Views

How to select/deselect data for columns in Google Charts?

How can I add selection boxes in the legend which selects/deselects the data to be displayed? For instance say I want to deselect t2 to not appear in the stacked columns? google.charts.load('current', {packages: ['corechart']}); google.charts.setOnLoadCallback(drawChart) function drawChart() { va...
alex
1

votes
1

answer
52

Views

How to click in a serie area chart below another serie area chart in HighCharts?

I have this following chart: https://i.stack.imgur.com/01ulJ.png And how you can see, I have two area chart, a green one and a blue one. The green one is bigger than the blue one so it's over blue one. But I would like to display an alert for example, 'Hello World', when the user click on the blue...
João Vitor Corrêa
1

votes
0

answer
357

Views

Google chart pagination

I have problem with google charts. I am using ColumnChart to show my data. I wan t to implement pagination on charts. This is my chart: I want to implement something like this: This is my option for chart var options = { width: '100%', height: '100%', chartArea: { width: '90%', height: '90%', }, bar...
mrkibzk
1

votes
1

answer
104

Views

Google Charts LogScale not working

I'm using Google Charts to make a bar graph and I'm trying to get the graph to use a logscale on the vertical axis but it's not working for some reason. I've tried using logScale and scaleType but neither of them work. Here's my code: google.charts.load('current', { 'packages': ['bar'] }); google.ch...
Neuro
1

votes
0

answer
53

Views

Vega.js - Is there a way to apply autosize to individual groups?

I'm using Vega 3.x — Is there a way to apply auto-sizing properties to just a single group? Take a look at the following example: { '$schema': 'https://vega.github.io/schema/vega/v3.0.json', 'width': 500, 'height': 300, 'data': [ { 'name': 'table', 'values': [ {'category':'Long Cagtegory A', 'posi...
Joel
1

votes
1

answer
350

Views

Google Charts - Dashboard toggle data series on/off [duplicate]

This question already has an answer here: How to add colors to spefic columns in Google Charts 1 answer As always I appreciate the experts here! The check box should toggle the 5th column in the chart. (red goal line) Function colToggle() in general is working because the switch gets me to the righ...
cmill
1

votes
1

answer
1.2k

Views

swift: 'Unexpectedly found nil while unwrapping an Optional value' error and unable to find the source [duplicate]

This question already has an answer here: What does “fatal error: unexpectedly found nil while unwrapping an Optional value” mean? 8 answers I have been working on finding the source of this error for many hours and am unable to do so. The error appears after I try to select the first value fro...
Joel Hochman
1

votes
0

answer
422

Views

Line chart using Angular4 and PrimeNg

Is it possible to get an example with a nested set of data for a line chart?This is my code:- this.data1 = { datasets: [ { label: 'BILL', data: [this._billList, this.billDateList], fill: false, borderColor: '#565656' }, { label: 'GRN', data: [this._grnList, this.grnDateList], fill: false, borderColo...
Dipin raman
1

votes
0

answer
134

Views

How to print two Google Charts in one PNG image?

I'm writting a code which shows two different Google Charts in one XHTML page. I need to put a button that export both graphs to the same PNG file, one above the other as they are shown. To export one single chart is easy and is already done; Google documentation teaches that in here with only minor...
Momergil
1

votes
1

answer
17

Views

Google Charts adding unwanted text

I'm made a integration with google Spreadsheets, works really well, but on the Y-AXIS on the BARS and LINES chart, a 'General' is printed with the range number! My code: // Load the Visualization API and the corechart package. google.charts.load('current', {'packages':['corechart']}); // Set a callb...
Erick Amaral
1

votes
1

answer
168

Views

Unable to create charts using bokeh

So I'm using the following code in Spyder to create a chart which will be displayed in a web browser: import pandas as pd import numpy as np from bokeh.plotting import figure, output_file, show car = pd.read_csv('car_sales.csv') Month = car['Month'] Sales = car['Sales'] output_file('bokeh_scatter_ex...
IndigoChild
1

votes
1

answer
233

Views

Keep chart/graph style

Is it possible to keep the chart style (shape styles) from a xlsx file when I read and write it? With my code below the style is lost . require 'vendor/autoload.php'; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Writer\Xlsx AS WXlsx; use PhpOffice\PhpSpreadsheet\Chart\Chart...
bhanequin
1

votes
0

answer
631

Views

Customising Microcharts

I'm trying to achieve the chart similar to the attached screenshot. The problem is, how can I put values in each arc (70, 76) of the chart? I'm using Microchart library. The attached screenshot is from SmartHotel360 xamarin demo app. It would be really helpful if someone can help me to point in the...
dsakpal
1

votes
1

answer
39

Views

Google visualisation with Chartrangeslider and data import from Google docs spreadsheet

I have the problem, that I dont manage to implement my data from a google spread sheet when using dashboard environment with chartwrapper and controlwrapper. I used the piechart example from the google charts website (https://developers.google.com/chart/interactive/docs/gallery/controls) and tried t...
Christoph Seiffert
1

votes
1

answer
65

Views

Legend in Google Chart not loading properly

I am using Google Charts for displaying data and the graph loads properly, but the legend is not loading properly. This is the jsfiddle link to my chart. Please check the legend position and you will understand my error. Below is my code, html test chart this is the test tab my js graph(); function...
Arigato Manga
1

votes
1

answer
123

Views

Highcharts - Redundant Y Axis Point Markers (Any insight welcome!)

Having an issue with a dynamic multiple Y axes. Occasionally the spline lines register two data points and botch the spline up. This code is within programable logic controller that employs a 'widget adapter' in which the HTML is handled separately. I am admittedly a hack at this and have managed t...
Justin Lindstrom
1

votes
2

answer
273

Views

PowerPoint VBA Macro for deleting charts

I have implemented a VBA macro for deleting charts in a Power Point document. The code is as follows: Sub cleanCharts() Dim shp As Shape Dim sld As Slide 'Loop Through Each Slide in ActivePresentation For Each sld In ActivePresentation.Slides For Each shp In sld.Shapes If shp.HasChart Then shp.Delet...
framontb
1

votes
0

answer
136

Views

Google chart, annotations and label issues

I'm generating a graph using google chart, however I have several problems. First: Currently an annotation is displayed in the second series in which it shows the place in the ranking. However, if there is more space in the second series (gray background) the text is moved lower or disappears comple...
Hubert Szkudlarek
1

votes
1

answer
58

Views

Pie chart not showing slice

I create a pie chart using google services. the problem is that i want to show credit and debit in pie chart, but output comes only in one color. Here is my query. $data = mysqli_query($link, 'select SUM(pay_payable) as debit, SUM(pay_paid) as credit from purchasers_payment where p_id = '$pur_id'');...
umar Aslam
1

votes
1

answer
417

Views

Responsive Google Donut chart with responsive Pie hole?

I am trying to make my google charts responsive and this help me out a lot: as I am using bootstrap as well. But with my PieChart I added an overlay in the center piehole. How do I make the piehole overlay responsive as well, like in the code preview it was in the center but now it is way off and re...
user9191816
1

votes
0

answer
105

Views

d3 v4 smoothing line using curve

I have the following line: I tried smoothening the line using the curve functions: JS: const line = d3 .line() .curve(d3.curveMonotoneY) .x(d => x(d[0])) .y(d => y(d[1])); CSS: .line { stroke-width: 1px; fill: none; // shape-rendering: optimizeSpeed; stroke-linejoin: round; } But no matter what type...
Avraam Mavridis
1

votes
0

answer
55

Views

PlotlyJS rescale yaxis when xaxis range is updated (via rangeslider)

I have the sample chart with range slider created with PlotlyJS: It uses API endpoint to fetch data. Now, the slider can be used to change xaxis range like: but then the chart looks strange as yaxis has this fixed range and visible data covers only small vertical part of the whole chart. Is it possi...
f1ames
1

votes
0

answer
267

Views

Xamarin forms listview databind to Microchart

I have a working ListView(PeopleList) connected to an ObservableCollection and would like to use Microchart to display a graph for each item in the ListView. Is this possible and how would you go about binding and updating the chart in code behind? I am new to Xamarin. XML .... Codebehind public asy...
T.Nike
1

votes
1

answer
265

Views

Swift 3 Line Chart Get Index

So Im making a graph using the Beautiful Charts Api. Im doing it in SWIFT 3. I got the graph working but now Im trying to get the selected value index, I have tried many things but they have not work. Heres my latest attempt at it. func chartValueSelected(_ chartView: ChartViewBase, entry: ChartDat...
Daniel Cisneros
1

votes
0

answer
148

Views

Chartjs 2-categorical

I'm successfully graphing a bunch of data points using Chartjs 2 with React, with a category Y-axis, but would like to label them with their category label. They're currently showing 'undefined' as a tooltip value: Here's what I've got right now (not working): labels: this.state.graphData.eventWeekA...
Boris K
1

votes
1

answer
28

Views

How to get Google Charts to sort and give me correct answer

Okay so I have some data and I need to get Google Charts to sort 3 types of answers from several lines of code. How do I do that with my current code: google.charts.load('current'); // Don't need to specify chart libraries! google.charts.setOnLoadCallback(drawVisualization); function drawVisualiza...
Chancellor Purvis
1

votes
0

answer
1.8k

Views

Implementing hover callback in Chart.js

I'm trying to implement a hover callback in the chart I made using Chartjs. Here's the part below I'm confused: var chart = new Chart(ctx, { type: 'line', data: data, options: { // Am I supposed to put onHover callback inside of hover property of options? //hover: { // onHover: (e, elements): voi...
DongBin Kim
1

votes
0

answer
127

Views

Chart.js Doughnut Chart Sharing filters with Bar Chart

I am trying to have the Doughnut chart filters affecting the bar chart values, imagine, I have the same values in the bar chart as I have for the Doughnut Chart and when I click to disable a value in the pie chart I want it to disable the same value in the bar chart. This is my code to the Doughnut...
JoeSaladas
1

votes
1

answer
233

Views

One or more participants failed to draw() with google dashboard

I tried to implement a google dashboard prototype with a category picker and a pie chart, while displaying the datatable. However, even while following the sample code from the documentation (https://developers.google.com/chart/interactive/docs/gallery/controls#5-create-control-and-chart-instances),...
nilesguo

View additional questions