hoogi91 / charts Goto Github PK
View Code? Open in Web Editor NEWTYPO3 Extension charts
Home Page: https://extensions.typo3.org/extension/charts/
License: GNU General Public License v3.0
TYPO3 Extension charts
Home Page: https://extensions.typo3.org/extension/charts/
License: GNU General Public License v3.0
Description
TYPO3 v10 is coming in the next few days. See https://typo3.org/cms/roadmap/
The library should support this version too :)
Hi everyone.
Version(s) affected: 1.1.0
Description
The class Hoogi91\Charts\Controller\Wizard\TableController
tries to fix empty values with the method fixEmptyConfiguration
.
This method gets it's $configuration
from the TYPO3\CMS\Backend\Controller\Wizard\TableController::getConfiguration
, and expects an array. The problem is that the method may return an object instead.
See: https://github.com/hoogi91/charts/blob/1.1.0/Classes/Controller/Wizard/TableController.php#L47
And: https://github.com/TYPO3/TYPO3.CMS/blob/v10.4.4/typo3/sysext/backend/Classes/Controller/Wizard/TableController.php#L251
How to reproduce
Not sure if I can be helpful here. I'm only able to reproduce this with the save_close_ce
extension and when save_and_close'ing one of our custom record.
But . . .
See: https://github.com/TYPO3/TYPO3.CMS/blob/v10.4.4/typo3/sysext/backend/Classes/Controller/Wizard/TableController.php#L294
Here we have the save and close action, which may (or may not) return an object instead of an array. It does not happen with all of records types.
Looks like the core devs have the save_and_close action forgotten in there.
Possible Solution
Either declare save_close_ce
incompatible, or test if you are handling an array.
Tobi
Version(s) affected: 2.0.0
Description
Firefox V 97.0 (64-Bit) triggers function not found exceptions in javascript console when accessing the modal
How to reproduce
Possible Solution
Seems like firefox is not interpreting JavaScript arrow functions correctly and does not maintain the overlaying JavaScript Class as "this" inside eventlistener callbacks. bind(this) could be a solution but requires a lot of code refactoring.
Additional context
There is another small issue around the colorpicker. If you created a new palette, the palette would show up in the backend. The element which holds and displays the color as a bar, has a height of 32px which is ignored due to the elements inline nature. Add display: block as additional css rule (Classes/Form/Element/ColorPaletteInputElement.php line 47) to display the bar as desired.
Hi @hoogi91,
PHP 8.2 will only be receiving security updates starting the next year.
We're currently looking into upgrading our projects to PHP 8.3.
This extension is currently restricted to PHP 8.1 and 8.2.
Can you allow PHP 8.3 in the dependencies, or are there known issues with that PHP version?
Kind regards
Mario
Description
In April 2021 Charts.js v3 released. This extension currently uses v2 and should probably use the latest version.
Migration guide: https://www.chartjs.org/docs/latest/getting-started/v3-migration
Version(s) affected: 10.0.2
Running on TYPO3 9.5.9
Description
After installing charts 1.0.2 copying and inserting a content elment creates the following error messages:
2: SQL error: 'Incorrect integer value: '' for column db
.tt_content
.tx_charts_chartdata
at row 1' (tt_content:NEW5d8dac251e71e122382317)
1: Attempt to insert record on page '[root-level]' (0) where this table, tt_content, is not allowed
How to reproduce
Make a plain installation on TYPO3 9.5.9
install charts 1.0.2 form TER
create an arbitary content element on one page i.e. text with media, copy it in the page module and insert it. Two error messages (above) will appear, content element doesnt get inserted
Possible Solution
after uninstalling extension charts the error disappears. installing it again and the error can be reproduced once more
Version(s) affected: 2.0.6 (and before)
TYPO3 10.4.28
Description
When doing a fresh installation, the extension options in BE for legends and more are missing.
Possible Solution
Changing in extension options from default apexcharts to chartjs (and back) and saving the content element again (no change needed).
Version(s) affected: 2.0.5
TYPO3 10.4.27
Description
After doing a fresh installation, adding a simple dataset and adding a plugin with this data in backend, I get a Class Hoogi91\Spreadsheets\Service\ExtractorService does not exist. Reflection failed.
in BE and FE.
Possible Solution
The installation of EXT:spreadsheet does help. But as I understand the documentation, it is not mandatory to install EXT:spreadsheet.
Version(s) affected: 2.0.0+
Description
We're using a plain dataset record with two labels ("Label 1", "Label 2"). However only the first label is displayed in frontend.
How to reproduce
Chart Dataset:
Labels:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3TableWizard>
<numIndex index="2" type="array">
<numIndex index="2">97</numIndex>
<numIndex index="4">98</numIndex>
<numIndex index="6">99</numIndex>
<numIndex index="8">00</numIndex>
<numIndex index="10">01</numIndex>
<numIndex index="12">02</numIndex>
<numIndex index="14">03</numIndex>
<numIndex index="16">04</numIndex>
<numIndex index="18">05</numIndex>
<numIndex index="20">06</numIndex>
<numIndex index="22">07</numIndex>
<numIndex index="24">08</numIndex>
<numIndex index="26">09</numIndex>
<numIndex index="28">10</numIndex>
<numIndex index="30">11</numIndex>
<numIndex index="32">12</numIndex>
<numIndex index="34">13</numIndex>
<numIndex index="36">14</numIndex>
<numIndex index="38">15</numIndex>
<numIndex index="40">16</numIndex>
<numIndex index="42">17</numIndex>
<numIndex index="44">18</numIndex>
<numIndex index="46">19</numIndex>
<numIndex index="48">20</numIndex>
</numIndex>
</T3TableWizard>
Datasets:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3TableWizard>
<numIndex index="2" type="array">
<numIndex index="2">300</numIndex>
<numIndex index="4">310</numIndex>
<numIndex index="6">340</numIndex>
<numIndex index="8">420</numIndex>
<numIndex index="10">410</numIndex>
<numIndex index="12">430</numIndex>
<numIndex index="14">410</numIndex>
<numIndex index="16">440</numIndex>
<numIndex index="18">480</numIndex>
<numIndex index="20">540</numIndex>
<numIndex index="22">600</numIndex>
<numIndex index="24">610</numIndex>
<numIndex index="26">510</numIndex>
<numIndex index="28">540</numIndex>
<numIndex index="30">620</numIndex>
<numIndex index="32">610</numIndex>
<numIndex index="34">630</numIndex>
<numIndex index="36">660</numIndex>
<numIndex index="38">710</numIndex>
<numIndex index="40">720</numIndex>
<numIndex index="42">780</numIndex>
<numIndex index="44">850</numIndex>
<numIndex index="46">900</numIndex>
<numIndex index="48">950</numIndex>
</numIndex>
<numIndex index="4" type="array">
<numIndex index="2">400</numIndex>
<numIndex index="4">410</numIndex>
<numIndex index="6">440</numIndex>
<numIndex index="8">520</numIndex>
<numIndex index="10">510</numIndex>
<numIndex index="12">530</numIndex>
<numIndex index="14">510</numIndex>
<numIndex index="16">540</numIndex>
<numIndex index="18">580</numIndex>
<numIndex index="20">640</numIndex>
<numIndex index="22">700</numIndex>
<numIndex index="24">710</numIndex>
<numIndex index="26">610</numIndex>
<numIndex index="28">640</numIndex>
<numIndex index="30">520</numIndex>
<numIndex index="32">510</numIndex>
<numIndex index="34">530</numIndex>
<numIndex index="36">560</numIndex>
<numIndex index="38">710</numIndex>
<numIndex index="40">620</numIndex>
<numIndex index="42">780</numIndex>
<numIndex index="44">950</numIndex>
<numIndex index="46">800</numIndex>
<numIndex index="48">850</numIndex>
</numIndex>
</T3TableWizard>
Dataset Labels:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3TableWizard>
<numIndex index="2" type="array">
<numIndex index="2">Label 1</numIndex>
<numIndex index="4">Label 2</numIndex>
</numIndex>
</T3TableWizard>
Possible Solution
Hoogi91\Charts\Domain\Model\ChartDataPlain::getDatasetsLabels
grabs the first column of $labels
:
public function getDatasetsLabels(): array
{
// grab first column of every row as dataset labels in plain element
$labels = $this->extractLabelList($this->datasetsLabels);
return array_column($labels, '0') ?? [];
}
For the XML above $labels
is [['Label 1', 'Label 2']]
.
By running array_column($labels, '0')
the method will return only ['Label 1']
Version(s) affected:
2.0.6
How to reproduce
composer require hoogi91/charts --no-dev
Possible Solution
Update code to be PHP >8 compatible
Additional context
If installed without --no-dev
, the "spreadsheets" extension will be installed and you cannot even create the diagram-data record due to PHP 8 errors
Hi, great Extension.
It would be cool to change the colors of the chart without messing with the spreadsheet itself.
Something like a colormatrix override.
I tried it by extending the ChartDataSpreadsheet model with a custom colormatrix field and used the table input TCA feature.
Background;Border
Instead of assigning the color information from the cells, the color matrix is read first.
Version(s) affected: 1.1.2 / 2.0.0
Description
The extension triggers a fatal error while accessing the extension configuration via TYPO3 backend when trying to include a nonexistent file.
How to reproduce
Possible Solution
Change code in Classes/DataProcessing/Charts/LibraryRegistry.php on line 24 to $autoloader = require Environment::getProjectPath() . '/vendor/autoload.php';
Additional context
Currently, the code on line 24 returns the webroot which should be the projectroot instead.
Version(s) affected: 1.1.0
Description
Every Position select field missing a renderType selectSingle
How to reproduce
Create a new Chart CE, in the FlexForm the position select field causes Unknown type: select, render type: select
Possible Solution
Add to every select that is a single select the renderType <renderType>selectSingle</renderType>
Hi Thorsten.
When you render too many charts on one page, the database will quit with a
The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size.
We have added more than 15 of them on one page (using a form to decide what to display).
Even with a disabled frontend cache, your code is extremely fast. ๐
Tobi
Version(s) affected: 2.0.6 (Typo3 11)
Description
There is no Plugin option (legend & position) in backend
Hi everyone.
The Hoogi91\Charts\Domain\ModelChartData::getDatasetsLabels
is suppressing the last configured label.
As can be seen here, the last configured label will never be accessible.
The array_shift
always removes the last label.
According to the comment, this is done intentionally, so it's not a bug.
Why is the last label being removed?
Can the array_shift
be removed or bypassed?
Tobi
Version(s) affected: 3
Description
There is currently a bug in the Hoogi91\Charts\DataProcessing\Charts\Library\ChartJs
class. The JavaScript file is not being loaded in TYPO3 12 due to an incorrect path. As a result, the charts are not appearing in the frontend.
Version(s) affected:
charts: 1.0.4
typo3: 9.5.*
Description
I can't bring the Extension to output anything. I tried without Spreadsheet and with Spreadsheet. I used Charts.js for FE output, but didn't work with Chartist either. Output is Empty.
If I use Spreadsheet and try to craete some data (by opening the Table wizard) only the checkbox "Small fields" is shown.
Also I saw some attributes of the content element, which I didn't had a form field for:
I don't have a field for Cutout Percentage and Legend.
I tried it with a clean typo3 9.5.11 instance.
How to reproduce
Require charts and spreadsheet with composer under TYPO3 9.5.* (I tried 9.5.11 and 9.5.9). Create a new chart dataset in the list module, click on the table symbol. --> empty form wizard should show.
create a new chart content element and add a chart dataset, open FE --> nothing should be shown
I assume I'm missing some requirement, but it isn't listed anywhere.
Anyone an idea what causes the problem?
Thanks in advance
Version(s) affected:
1.1.0, TYPO3 10.4
Description
To display a list of registered chart libraries in the extensions settings, LibraryRegistry
is loading ext_localconf.php of all loaded extensions. Unfortunately by just loading the configurations via ExtensionManagementUtility
the dependency injection (DI) is not supported and if classes used in ext_localconf.php depend on that, an ArgumentCountError
occurs in the extension configuration module.
How to reproduce
Prepare a TYPO3 10.4 installation and install charts 1.1.0 and evoweb/extender 7.x, then try to open extension configuration module.
Possible Solution
Adapt required bootstrapping in LibraryRegistry
.
Additional context
Details about the exception to expect when trying to reproduce:
(1/1) ArgumentCountError
Too few arguments to function Evoweb\Extender\Utility\ClassLoader::__construct(), 0 passed in /var/www/html/public/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 3481 and exactly 2 expected
Version(s) affected: 1.1.3
TYPO3 10.4
PHP 7.3
Description
Because of PHP 7.3 on the target system I had to revert to version 1.1.3 of EXT:charts. Apexcharts (which I preferred before) is not yet implamented so I tried chartist (has no legends) and now I'm using chartjs. (I miss the option to define my own colors, nice feature.) But by using chartjs all graphs are using the same color, a kind of red. Do I have any chance to get rid of this error?
Version(s) affected: all
Description
ChartJS option step size has no effect in frontend
How to reproduce
Using "Automatic calculation" and "Step Size" for x-axis together results in auto-calculated ticks.
Possible Solution
Changing javascript to support custom step size on automatic calculation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.