Hitachi Vantara Pentaho Community Forums
Results 1 to 1 of 1

Thread: Scandinavien letters in series names in JFreeComponent

  1. #1
    Join Date
    Jul 2008
    Posts
    23

    Default Scandinavien letters in series names in JFreeComponent

    Hi,

    I am having trouble with presenting the letter åäö via a SQL query in the chart definition in the CDF Dashboard.

    I am having following code in my dashboard template:
    Code:
    var waitingLineChart = 
    {
        name: "waitingLineChart",
        type: "jFreeChartComponent",
        listeners: ["MetaLayerCharts.startPeriod","MetaLayerCharts.endPeriod","MetaLayerCharts.patient_group"],
        chartDefinition: MetaLayerCharts.waitingLineChartDefinition,
        htmlObject: "lineChart_object",
        executeAtStart: true
    }
    MetaLayersCharts.js
    Code:
    startPeriod : "2007-01-01",
    endPeriod : "2007-12-31",
    
    series1 : "Dörrtid",
    series2 : "Väntetid",
    
    waitingLineChartDefinition : {
            width : 500,
            height : 300,
            chartType : "LineChart",
            datasetType : "CategoryDataset",
            is3d : false,
            byRow : false,
            isStacked : false,
            includeLegend : false,
            domainLabelRotationDir : "up",
            domainLabelRotation : 1.57079633,
            title : "Väntetider",
            includeLegend : true,
            queryType : 'sql',
    
            jndi : "demo_dwDS",
            query : function() {
                var query = "SELECT year_month_abbreviation, avg(door_to_door_time) as \" "
                        + MetaLayerCharts.series1
                        + "\", avg(waiting_time_to_first_doctor) as \""    
                        + MetaLayerCharts.series2 + "\" "
                        + "FROM emergency_visit_fact e, date_dim d, patient_dim p "
                        + "WHERE e.arrival_date_id=d.date_id and e.patient_id=p.patient_id and date between '"
                        + MetaLayerCharts.startPeriod
                        + "' and '"
                        + MetaLayerCharts.endPeriod + "' ";
                if (MetaLayerCharts.patient_group != "%") {
                    query += " and patient_group like '" + MetaLayerCharts.patient_group + "' ";
                }
                query += " GROUP BY year_month_abbreviation ORDER BY date ";
                return query;
            }
        },
    Everything work fine, the only problem is that the result of the series, please check the attached image.

    I have tried following:

    • encode_prepare("Dörrtid")
    • "D" + unescape("%F6") + "rrtid"
    • encode_prepare("D" + unescape("%F6") + "rrtid")
    • "Dörrtid" -->results in Dörrtid
    • encode_prepare("Dörrtid") -->results in Dörrtid

    I dont have any more ideas, can some help me with this?

    Thanks in advance
    //T
    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.