- Posts: 384
- Thank you received: 13
Substitutions langues graphiques widgets
10 years 6 months ago #234400
by hikaphil
Substitutions langues graphiques widgets was created by hikaphil
-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.5.0
Bonjour, je voudrais dans le même principe que ce topic modifier sales par ventes.
Merci.
-- Joomla version -- : 3.5.0
Bonjour, je voudrais dans le même principe que ce topic modifier sales par ventes.
Merci.
Please Log in or Create an account to join the conversation.
10 years 6 months ago #234416
by nicolas
Replied by nicolas on topic Substitutions langues graphiques widgets
Bonjour,
Changez la ligne:
en:
dans le fichier "chart" via le menu Affichage>Vues et cela devrait régler le problème.
Changez la ligne:
Code:
echo "dataTable.addColumn('number','".$oneResult->type."');"."\n";
Code:
echo "dataTable.addColumn('number','".$name."');"."\n";
The following user(s) said Thank You: hikaphil
Please Log in or Create an account to join the conversation.
10 years 6 months ago #234629
by hikaphil
Replied by hikaphil on topic Substitutions langues graphiques widgets
Bonsoir , non ça change rien :huh:
Please Log in or Create an account to join the conversation.
10 years 6 months ago #234662
by nicolas
Replied by nicolas on topic Substitutions langues graphiques widgets
Avez-vous fait le changement pour le bon template de votre backend ?
Pourriez vous fournir une capture d'écran des options du widget ?
Pourriez vous fournir une capture d'écran des options du widget ?
Please Log in or Create an account to join the conversation.
10 years 6 months ago - 10 years 6 months ago #234713
by hikaphil
Replied by hikaphil on topic Substitutions langues graphiques widgets
Bonjour, j'utilise isis
Merci
Code:
<?php
/**
* @package HikaShop for Joomla!
* @version 2.5.0
* @author hikashop.com
* @copyright (C) 2010-2015 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
$opt='';
$dateFormat='';
if(!isset($this->widget->widget_id)){
$id='preview';
}else{
$id=$this->widget->widget_id;
}
$chartType='';
switch($this->widget->widget_params->display){
case 'line':
$chartType='LineChart';
break;
case 'column':
$chartType='ColumnChart';
break;
case 'area':
$chartType='AreaChart';
break;
}
if(isset($this->widget->widget_params->period_compare)){
switch($this->widget->widget_params->period_compare){
case 'last_period':
$opt="hAxis: { format: 'MMM, dd' }";
break;
case 'last_year':
$opt="hAxis: { format: 'MMM, dd' }";
$dateFormat="var date_formatter = new google.visualization.DateFormat({pattern: 'MMM, d'});
date_formatter.format(dataTable, 0); ";
break;
case 'every_year':
$date=' - ';
break;
}
}
if($this->widget->widget_params->date_group == '%H %j %Y'){
$opt="hAxis: { format: 'yyyy, MMM d - H:00' }";
$dateFormat="var date_formatter = new google.visualization.DateFormat({pattern: 'yyyy, MMM d - H:00'});
date_formatter.format(dataTable, 0); ";
}
$name=$this->widget->widget_params->content;
?>
<script language="JavaScript" type="text/javascript">
function drawChart(){
var dataTable = new google.visualization.DataTable();
dataTable.addColumn('date');
<?php
$dates = array();
$types = array();
$i= 0;
$a = 1;
foreach($this->widget->elements as $oneResult){
if(empty($oneResult->type)){ continue; }
if(!isset($dates[$oneResult->calculated_date])){
$dates[$oneResult->calculated_date] = $i;
$i++;
echo "dataTable.addRows(1);"."\n";
echo "dataTable.setValue(".$dates[$oneResult->calculated_date].", 0, new Date(".$oneResult->year.", ".(int)$oneResult->month.", ".(int)$oneResult->day.", ".@(int)$oneResult->hour."));";
}
if(!isset($types[$oneResult->type])){
$types[$oneResult->type] = $a;
echo "dataTable.addColumn('number','".$name."');"."\n";
$a++;
}
echo "dataTable.setValue(".$dates[$oneResult->calculated_date].", ".$types[$oneResult->type].", ".$oneResult->total.");";
}
echo $dateFormat;
?>
var vis = new google.visualization.<?php echo $chartType; ?>(document.getElementById('<?php echo 'chart_'.$id; ?>'));
var options = {
legend:'right',
title: '<?php echo JText::_('ORDERS'); ?>',
legendTextStyle: {color:'#333333'},
<?php echo $opt; ?>
};
vis.draw(dataTable, options);
}
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
</script>
<?php
if(isset($this->edit) && $this->edit){
$size='width:80%; height:500px;';
}else{
$size='width: 400px; height: 210px;';
}
?>
<div id="chart_<?php echo $id; ?>" class="chart" style="<?php echo $size; ?> margin:auto;" align="center"></div>
Merci
Last edit: 10 years 6 months ago by hikaphil.
Please Log in or Create an account to join the conversation.
10 years 6 months ago #234714
by nicolas
Replied by nicolas on topic Substitutions langues graphiques widgets
Bonjour,
Vous n'utilisez pas la dernière version de la vue. Supprimez la personnalisation de cette vue, et appliquez le changement à la dernière version de la vue et cela fonctionnera.
Vous n'utilisez pas la dernière version de la vue. Supprimez la personnalisation de cette vue, et appliquez le changement à la dernière version de la vue et cela fonctionnera.
The following user(s) said Thank You: hikaphil
Please Log in or Create an account to join the conversation.
10 years 6 months ago #234814
by hikaphil
Replied by hikaphil on topic Substitutions langues graphiques widgets
Bonjour, oui ça fonctionne Merci
Please Log in or Create an account to join the conversation.
Time to create page: 0.235 seconds