Comments (3)
@tommiekn that could be a feature/bug in Chart.js library we use. Can you attach a screenshot/screencast how to reproduce?
from laravel-charts.
@PovilasKorop hi, i would avoid to attach a screenshot cause the chart is showing api endpoints.
Anyway is simply a chart where i know theres multiple voices with the same total result, and only one shows.
For reference, it should be working like this (this is an official Spotify Api chart):
In this example many records has 0 as result so while onmouse over it shows all of them.
Heres the chart code i am using:
$chart_options_request_endpoint = [
'chart_title' => 'Number of Requests/Endpoint',
'chart_type' => 'line',
'report_type' => 'group_by_date',
'model' => 'App\ApiLog',
'conditions' => [
['name' => 'name 1', 'condition' => 'url = "asd" and response = "200"', 'color' => 'black'],
['name' => 'name2', 'condition' => 'url = "asd1" and response = "200"', 'color' => 'green'],
['name' => 'name 3', 'condition' => 'url = "asd2" and response = "200"', 'color' => 'blue'],
],
'group_by_field' => 'created_at',
'group_by_period' => 'day',
//'aggregate_function' => 'sum',
//'aggregate_field' => 'id',
'filter_field' => 'created_at',
'filter_days' => 30, // show only transactions for last 30 days
'filter_period' => 'month', // show only transactions for this week
'continuous_time' => false, // show continuous timeline including dates without data
];
Thanks!
from laravel-charts.
I have checked Chart.js library docs and i believe what you miss is to specify the index value in the Chart.js options:
https://www.chartjs.org/docs/latest/general/interactions/modes.html#interaction-modes
You should add:
tooltips: {
mode: 'point'
},
I have tested it and fix the issue, you have a pull request here #27
I would suggest to move these settings in the laravel charts options in a future, to allow basic personalizations between charts.
from laravel-charts.
Related Issues (20)
- Filter Different account type HOT 2
- labels in the outputted JS can't have single quote " ' " in them.
- how to use chart_height HOT 1
- Bad Method Call HOT 2
- How i can show only number not pointed value HOT 3
- error : undefined array key "stacked" HOT 1
- Chart Color issue
- Chart can't group on Model Enum properties HOT 4
- Call to undefined relationship [user] on model XXXXXXX HOT 1
- Hi! Thanks!
- Multiple dataset from same Model but grouped by a foreign key HOT 1
- After ajax call how to update chart?
- Laravel Chart can't show attribute value from query
- Conditions not work HOT 3
- colors HOT 2
- NoSQL Compatibility HOT 4
- Sorting issue HOT 1
- Something went wrong HOT 7
- jquery ajax support??? HOT 1
- Allow user to modify labels HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-charts.